Switch Discord notifications from webhook to user ID DMs
Uses the existing bot token to send DMs to users by their Discord user ID instead of posting to a channel webhook. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -89,14 +89,14 @@ def register(app):
|
||||
settings = notifications.getNotificationSettings(user_uuid)
|
||||
if not settings:
|
||||
return flask.jsonify({
|
||||
"discord_webhook": "",
|
||||
"discord_user_id": "",
|
||||
"discord_enabled": False,
|
||||
"ntfy_topic": "",
|
||||
"ntfy_enabled": False,
|
||||
"web_push_enabled": False,
|
||||
}), 200
|
||||
return flask.jsonify({
|
||||
"discord_webhook": settings.get("discord_webhook") or "",
|
||||
"discord_user_id": settings.get("discord_user_id") or "",
|
||||
"discord_enabled": bool(settings.get("discord_enabled")),
|
||||
"ntfy_topic": settings.get("ntfy_topic") or "",
|
||||
"ntfy_enabled": bool(settings.get("ntfy_enabled")),
|
||||
|
||||
Reference in New Issue
Block a user