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
This commit is contained in:
+26
-1
@@ -23,8 +23,33 @@ class Admin implements ISettings {
|
||||
$params = [
|
||||
'hasBotPassword' => $this->talkService->hasBotPassword(),
|
||||
'retentionDays' => $this->talkService->getRetentionDays(),
|
||||
'rooms' => $this->talkService->getRooms(),
|
||||
'rooms' => $this->talkService->getAvailableTalkRooms(),
|
||||
'authTokens' => $this->talkService->getAuthTokens(),
|
||||
'configuredRooms' => $this->talkService->getRooms(),
|
||||
'serverUrl' => $this->talkService->getBaseUrl(),
|
||||
'senderName' => $this->talkService->getSenderNameDefault(),
|
||||
'l10n' => [
|
||||
'fetch_rooms' => $this->l10n->t('Fetch Rooms'),
|
||||
'error_fetching' => $this->l10n->t('Error fetching rooms'),
|
||||
'save_config' => $this->l10n->t('Save Configuration'),
|
||||
'config_saved' => $this->l10n->t('Configuration saved'),
|
||||
'save_failed' => $this->l10n->t('Configuration save failed'),
|
||||
'generate_token' => $this->l10n->t('Generate Token'),
|
||||
'revoke_token' => $this->l10n->t('Revoke'),
|
||||
'no_rooms' => $this->l10n->t('No rooms found'),
|
||||
'no_rooms_msg' => $this->l10n->t('No Talk rooms are available or you don\'t have permission to view them.'),
|
||||
'bot_password' => $this->l10n->t('Bot App Password'),
|
||||
'bot_password_desc' => $this->l10n->t('App password for the "talk-bot" user. Create one in Settings → talk-bot → Devices & sessions.'),
|
||||
'sender_name' => $this->l10n->t('Default Sender Name'),
|
||||
'sender_name_desc' => $this->l10n->t('Name used when posting messages as the bot.'),
|
||||
'image_retention' => $this->l10n->t('Image Retention (days)'),
|
||||
'image_retention_desc' => $this->l10n->t('How long to keep uploaded images before cleanup.'),
|
||||
'room_selection' => $this->l10n->t('Room Selection'),
|
||||
'room_selection_desc' => $this->l10n->t('Select which Talk rooms should accept webhooks. Enable the bot for a room by checking it.'),
|
||||
'auth_tokens' => $this->l10n->t('Auth Tokens'),
|
||||
'auth_tokens_desc' => $this->l10n->t('Auth tokens for this room. Used to validate incoming webhook requests.'),
|
||||
'no_password' => $this->l10n->t('Enter bot password to enable configuration.'),
|
||||
],
|
||||
];
|
||||
|
||||
$response = new TemplateResponse('ncdiscordhook', 'adminSettings', $params);
|
||||
|
||||
Reference in New Issue
Block a user