feat(notifications): accept optional click_url in notifications_push_user

Passes through to the notifications service, which embeds it as the
Gotify tap destination when set. Optional — no existing call site
changes, most notifications stay non-clickable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Ali Asadi 2026-08-22 09:36:24 +03:30
parent 079c795065
commit c7af6bb14b

View file

@ -75,7 +75,9 @@ def get_notifications_client():
return client
def notifications_push_user(user_uuid, title, message, priority=5, extras=None):
def notifications_push_user(user_uuid, title, message, priority=5, extras=None, click_url=None):
# click_url is optional — most notifications aren't clickable. When set,
# the notifications service embeds it as the tap destination.
class Tmp():
def to_dict(self):
return {
@ -83,6 +85,7 @@ def notifications_push_user(user_uuid, title, message, priority=5, extras=None):
'message': message,
'priority': priority,
'extras': extras,
'click_url': click_url,
}
push_data = Tmp()