feat(notifications): accept optional click_url in notifications_push_user #5
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