mirror of https://github.com/zulip/zulip.git
push notif: Explicitly set GCM priority `normal` for remove.
If we make a practice on the Zulip server of always explicitly setting the desired priority, then when an old server doesn't set the priority we can reasonably have the bouncer make a guess.
This commit is contained in:
parent
ffabebd7f3
commit
a293aeee23
|
@ -591,7 +591,7 @@ def handle_remove_push_notification(user_profile_id: int, message_id: int) -> No
|
|||
'event': 'remove',
|
||||
'zulip_message_id': message_id, # message_id is reserved for CCS
|
||||
})
|
||||
gcm_options = {} # type: Dict[str, Any]
|
||||
gcm_options = {'priority': 'normal'} # type: Dict[str, Any]
|
||||
|
||||
if uses_notification_bouncer():
|
||||
try:
|
||||
|
|
|
@ -710,7 +710,7 @@ class HandlePushNotificationTest(PushNotificationTest):
|
|||
{'gcm': True,
|
||||
'event': 'remove',
|
||||
'zulip_message_id': message.id},
|
||||
{})
|
||||
{'priority': 'normal'})
|
||||
|
||||
@override_settings(SEND_REMOVE_PUSH_NOTIFICATIONS=True)
|
||||
def test_non_bouncer_push_remove(self) -> None:
|
||||
|
@ -739,7 +739,7 @@ class HandlePushNotificationTest(PushNotificationTest):
|
|||
{'gcm': True,
|
||||
'event': 'remove',
|
||||
'zulip_message_id': message.id},
|
||||
{})
|
||||
{'priority': 'normal'})
|
||||
|
||||
def test_user_message_does_not_exist(self) -> None:
|
||||
"""This simulates a condition that should only be an error if the user is
|
||||
|
|
Loading…
Reference in New Issue