mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-19 19:25:27 -04:00
feat(reminders): add generic webhook as a fourth reminder channel (#2952)
Replaces any Discord-specific reminder channel with a generic outbound
webhook channel. Users pick any saved Integration as the target and
supply a JSON payload template with {{title}} and {{message}}
placeholders — values are JSON-escaped before substitution. Works with
Discord, Slack, Teams, ntfy (JSON mode), or any service that accepts a
POST with a JSON body.
- `src/settings.py` — reminder_webhook_integration_id +
reminder_webhook_payload_template defaults
- `routes/note_routes.py` — webhook delivery block; Integration lookup,
template rendering, auth wiring; built-in preset defaults so
discord_webhook works out of the box without a configured template;
settings_override kwarg avoids test-button race condition
- `routes/auth_routes.py` — discord_webhook preset test handler
- `src/integrations.py` — discord_webhook preset with description +
example templates; hides auth/key fields in the Integration form
- `src/builtin_actions.py` — webhook_sent delivery check
- `src/tool_implementations.py` — webhook aliases + enum updated
- `static/index.html` — Webhook channel option; Integration picker +
payload template textarea
- `static/js/settings.js` — Integration list, populateWebhookIntegrations,
syncChannelRows, hints, load/save, auto-fill preset templates,
test-button override payload, hide auth/key for URL-auth presets
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -100,6 +100,19 @@ INTEGRATION_PRESETS: Dict[str, Dict[str, Any]] = {
|
||||
" GET /{topic}/json?poll=1 — poll for messages"
|
||||
),
|
||||
},
|
||||
"discord_webhook": {
|
||||
"name": "Discord Webhook",
|
||||
"auth_type": "none",
|
||||
"description": (
|
||||
"Discord Incoming Webhook. Paste the full webhook URL (including the token) as the Base URL.\n"
|
||||
"To get a URL: Discord server -> Server Settings -> Integrations -> Webhooks -> New Webhook -> Copy Webhook URL.\n"
|
||||
"The secret is embedded in the URL — leave auth type as None.\n\n"
|
||||
"Use this integration as the target in Settings -> Reminders -> Webhook channel.\n"
|
||||
"Payload template examples:\n"
|
||||
" Simple: {\"content\": \"{{title}}: {{message}}\"}\n"
|
||||
" Embed: {\"embeds\": [{\"title\": \"{{title}}\", \"description\": \"{{message}}\", \"color\": 5793266}]}"
|
||||
),
|
||||
},
|
||||
"vaultwarden": {
|
||||
"name": "Vaultwarden",
|
||||
"auth_type": "header",
|
||||
|
||||
Reference in New Issue
Block a user