- 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.
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
return [
|
|
'routes' => [
|
|
[
|
|
'name' => 'webhook#receive',
|
|
'url' => '/discord-webhook/{roomToken}/{token}',
|
|
'verb' => 'POST',
|
|
],
|
|
[
|
|
'name' => 'webhook#saveConfig',
|
|
'url' => '/save-config',
|
|
'verb' => 'POST',
|
|
],
|
|
[
|
|
'name' => 'webhook#getRooms',
|
|
'url' => '/rooms',
|
|
'verb' => 'GET',
|
|
],
|
|
[
|
|
'name' => 'webhook#saveBotPassword',
|
|
'url' => '/save-bot-password',
|
|
'verb' => 'POST',
|
|
],
|
|
[
|
|
'name' => 'webhook#debug',
|
|
'url' => '/debug',
|
|
'verb' => 'GET',
|
|
'type' => 'noCsrf',
|
|
],
|
|
[
|
|
'name' => 'webhook#receiveApprise',
|
|
'url' => '/apprise-webhook/{roomToken}/{token}',
|
|
'verb' => 'POST',
|
|
],
|
|
[
|
|
'name' => 'webhook#receiveAppriseNotify',
|
|
'url' => '/apprise-webhook/{roomToken}/notify/{token}',
|
|
'verb' => 'POST',
|
|
],
|
|
],
|
|
];
|