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:
parent
079c795065
commit
c7af6bb14b
1 changed files with 4 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue