Commit Graph
6 Commits
Author SHA1 Message Date
kyle 42fa70491d feat(webhook): add Apprise webhook support and rename bot-webhook to discord-webhook
- 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.
2026-06-12 16:40:53 -07:00
kyle 6453715bf0 fix: update TalkService for Talk 14 compatibility and add CLI copy helper
- **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.
2026-06-12 14:32:52 -07:00
kyle 4d0bb40120 feat(config): support disabling rooms and sync auth tokens
- 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
2026-06-12 11:47:16 -07:00
kyle 5b521afec1 feat: update for Nextcloud 33 and refactor Talk integration
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
2026-06-12 11:17:51 -07:00
kyle aa06394aa9 feat: enhance webhook settings UI and security: Mostly working, just final post not functioning
- 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
2026-06-11 10:55:30 -07:00
kyle 3f51a8ca48 Can now get channels!
- 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
2026-06-11 10:21:23 -07:00