- Inject ParticipantSession to allow overwriting the current actor.
- Add setSessionOverwrite and clearSessionOverwrite methods.
- Defer room share creation to occur after text POST with session overwrite active.
- This prevents Talk 23.0.6 fixMimeTypeOfVoiceMessage from triggering "guest" actor bug.
- Comment out direct addSystemMessage call, relying on Talk's event listener.
- Update richObject with actual shareId after deferred creation.
Works, image in chat, but duplicate from a "guest" and idk why that happens.
- Remove code block creating public link shares for rich object scraping
- Update comments to note that TYPE_ROOM shares do not produce public URLs
- Set shareToken to null in the return array
- Remove fallback logic appending public share URLs to message text
- Reorder ChatManager::addSystemMessage() block
Mostly working. Image actually being embedded now.
- Inject `ChatManager` dependency into `TalkService`.
- Refactor `uploadImage` to generate timestamped filenames (`talk-bot YYYY-MM-DD hh.mm.ss.microsec.ext`) and fix directory creation logic for Nextcloud 33 compatibility.
- Update file sharing logic to use `TYPE_ROOM` shares resolved by `fileId` and create a separate `TYPE_LINK` share for public previews.
- Switch message posting to use `ChatManager::addSystemMessage` for `file_shared` events.
- Send text message via HTTP API as a fallback to ensure participant records and moderation checks.
- Update logging to include debug information for rich objects and share IDs.
- Resolve Talk services via \OCP\Server::get for NC33 compatibility
- Compute actual file size from disk and update filecache entry with correct size and etag
- Clear password on public share URLs to allow inline image embedding in Talk
- Append public share URLs to message text so Talk's linkifier can scrape og:image for rich previews
- Update chat API call to pass message and actorDisplayName as query parameters
- Inject ParticipantService dependency
- Improve logging for chat API responses
- Replace getFolder() with get() and fallback creation to fix LazyFolder compatibility in NC33
- Add support for unwrapping nested 'data' keys in Home Assistant REST notify payloads
- Implement fallback to $_GET when request body is empty
- Refactor buildRichObject to use direct PDO queries for filecache and share creation, bypassing lazy node resolution
- Generate timestamped filenames for uploaded images to prevent overwrites
- Add comprehensive logging for webhook payloads, image processing, and filecache verification
- Update IShareManager imports and usage to align with Nextcloud API changes
- Improve image attachment handling to support URLs, base64, and file paths
- Wrap image processing in try-catch to prevent webhook crashes on image failures
- Add `agent.md`: Complete maintenance reference covering project structure, API interactions, data flow, configuration, security, and operational procedures.
- Add `architecture.md`: High-level architecture overview including component map, data flow, design decisions, and security model.
- Update `README.md`: Add Apprise support documentation, manual deployment instructions, updated installation steps (bot admin requirement), and expanded payload mapping and troubleshooting sections.
- Improve `lib/Controller/WebhookController.php`: Enhance `saveBotPassword` validation to check for missing fields and validate the password content.
- Improve `lib/Service/TalkService.php`: Add `validateBotPassword` method for round-trip encryption testing and integrate it into `saveConfig`.
- Update `css/adminSettings.css`: Add styles for the new `.nc-app-frame` wrapper.
- Update `templates/adminSettings.php`: Refactor UI structure to use `.nc-app-frame` and improve layout of settings sections.
- Update namespace from OCA\NCdiscordhook to OCA\Ncbotwebhooks
- Update app ID, name, and namespace in appinfo/info.xml
- Update composer.json and autoload files
- Update CLI command names from ncdiscordhook:* to nc_bot_webhooks:*
- Update image directory name to nc_bot_webhooks-images
- Update documentation in README.md and INSTALL.md
- Update JavaScript APP_ID and navigation provider paths
- Update admin settings and controller app references
- lib/Controller/WebhookController.php: Extract subject/title from wrapper level and add fallback to default sender name
- lib/Service/TalkService.php: Update display name logic to check subject, and use title/subject as message body when empty
- Add lib/Command/DebugToggle.php to enable/disable debug endpoint via CLI
- Update lib/Controller/WebhookController.php to check debug status
- Add support for base64 attachments in lib/Service/TalkService.php
- Bump version in appinfo/info.xml to 1.1.0
- Update INSTALL.md and README.md documentation
- Add `prependDisplayName` method to `TalkService` to format the name line
- Update `WebhookController` to prepend display name for Talk messages
- Update `mapApprisePayload` to extract and pass display name from Apprise title or config
- Add `displayName` to return array in `mapApprisePayload`
- Rename the Discord webhook endpoint from `/bot-webhook/` to `/discord-webhook/` for better clarity.
- Add new routes and controller methods (`receiveApprise`, `receiveAppriseNotify`) to support Apprise integrations.
- Implement `mapApprisePayload` in TalkService to map Apprise JSON format (title, body, type, attachments) to Talk message format.
- Update the settings UI to generate and display URLs for both Discord and Apprise webhooks.
- Update `INSTALL.md` and `README.md` documentation to reflect the new webhook paths and Apprise support.
- Refactor token revocation logic to revoke all tokens for a room at once.
- **TalkService**:
- Refactored `ensureBotParticipants` to use `AttendeeMapper` directly, removing the dependency on `ParticipantService`.
- Added `getBotDisplayNameForRoom` to resolve the bot's display name via direct DB query.
- Updated `sendMessage` to use Chat API v1 and include `richObjectsEnd`.
- Improved `getBaseUrl` logic to handle `overwritehost` and `overwritewebroot`.
- **WebhookController**:
- Fixed `getAllValues` to iterate known keys manually, preventing `RuntimeException` in Nextcloud 33.
- Added error handling for `saveConfig`.
- Removed unused `ParticipantService` import.
- **js/settings.js**:
- Added functionality to copy CLI commands to the clipboard.
- **Deletions**:
- Removed `lib/Command/AddBotParticipant.php` as its logic is now integrated into `TalkService`.
- **Templates**:
- Updated admin settings labels and comments.
- Add `ncdiscordhook:add-bot-participant` console command to register talk-bot in all configured rooms
- Extend debug endpoint with webhook URL validation and test post capabilities
- Improve `getBaseUrl()` to prefer public trusted domains, fixing container deployment issues
- Add `OCS-APIRequest` header and accept 2xx HTTP status codes for successful message posting
- Auto-register talk-bot as a participant during configuration initialization
- Add support for `disabled_rooms` to remove rooms from active configuration
- Sync auth tokens from server to client to prevent state drift
- Enable `allow_local_address` for Talk API requests
- Update settings page to fetch configured rooms instead of available ones
Channel list working, url generation, just need posting working now
- Update dependency to Nextcloud 33 and add `spreed` dependency
- Change webhook route from `/webhook` to `/bot-webhook`
- Add `NavigationProvider` to add app to admin settings menu
- Refactor `TalkService` to query Talk DB directly for room listing (public channels)
- Update `postToRoom` to use Talk Chat API with Basic Auth for `talk-bot` user
- Add debug helper methods to `TalkService` for room debugging
- Enhance `debug` endpoint with detailed system and Talk configuration info
- Update admin settings UI with "Default Sender Name" field and improved room selection
- Add localization strings to admin settings
- Update documentation (`INSTALL.md`, `README.md`) for new route and bot admin requirement
- Improve `getBaseUrl` logic to prioritize `trusted_domains` for Docker compatibility
- Add CSS styles for token URL input and hints
- Implement safe data attribute parsing in settings.js
- Refactor room fetching logic to use promise chains and auto-fetch on load
- Display full webhook URLs in the settings UI instead of raw tokens
- Generate URL-safe base64 tokens to prevent encoding issues
- Add #[PublicPage] attribute to WebhookController for unauthenticated delivery
- Filter out internal Nextcloud Talk system rooms from the room picker
- Add OCS-ApiRequest header to bot API requests
- Sanitize data attributes in templates to prevent XSS
- Inject LoggerInterface across WebhookController, TalkService, and ImageCleanup
- Replace TalkService.getAvailableTalkRooms() OCS API calls with direct database queries
- Add getBaseUrl() helper to resolve localhost/SSRF constraints for internal API calls
- Update buildRichObject() to generate public link shares for file attachments
- Add saveBotPassword, debug, and debugTables endpoints to WebhookController
- Separate frontend assets (JS/CSS) from adminSettings template
- Add composer.json and autoload files for PSR-4 autoloading
- Update Admin settings to use TemplateResponse and register app icons