mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:41:46 +00:00
push_notification: Remove 'zulip_message_id' from FCM payload.
This commit removes the 'zulip_message_id' field from the FCM payload for remove push notification. Clients that use `zulip_message_ids` instead have been out for years and we no longer support older client versions that don't.
This commit is contained in:
committed by
Tim Abbott
parent
1a5cab130d
commit
c9edb9c9ce
@@ -24,6 +24,10 @@ format used by the Zulip server that they are interacting with.
|
|||||||
|
|
||||||
* Mobile push notification payloads for APNs no longer contain the
|
* Mobile push notification payloads for APNs no longer contain the
|
||||||
`server` and `realm_id` fields, which were unused.
|
`server` and `realm_id` fields, which were unused.
|
||||||
|
* Mobile push notification payloads for FCM to remove push
|
||||||
|
notifications no longer contain the legacy pre-2019
|
||||||
|
`zulip_message_id` field; all functional clients support the newer
|
||||||
|
`zulip_message_ids`.
|
||||||
|
|
||||||
**Feature level 412**
|
**Feature level 412**
|
||||||
|
|
||||||
|
|||||||
@@ -1203,9 +1203,6 @@ def get_remove_payload_gcm(
|
|||||||
gcm_payload.update(
|
gcm_payload.update(
|
||||||
event="remove",
|
event="remove",
|
||||||
zulip_message_ids=",".join(str(id) for id in message_ids),
|
zulip_message_ids=",".join(str(id) for id in message_ids),
|
||||||
# Older clients (all clients older than 2019-02-13) look only at
|
|
||||||
# `zulip_message_id` and ignore `zulip_message_ids`. Do our best.
|
|
||||||
zulip_message_id=message_ids[0],
|
|
||||||
)
|
)
|
||||||
gcm_options = {"priority": "normal"}
|
gcm_options = {"priority": "normal"}
|
||||||
return gcm_payload, gcm_options
|
return gcm_payload, gcm_options
|
||||||
|
|||||||
@@ -655,7 +655,6 @@ class HandlePushNotificationTest(PushNotificationTestCase):
|
|||||||
"user_id": self.user_profile.id,
|
"user_id": self.user_profile.id,
|
||||||
"event": "remove",
|
"event": "remove",
|
||||||
"zulip_message_ids": str(message.id),
|
"zulip_message_ids": str(message.id),
|
||||||
"zulip_message_id": message.id,
|
|
||||||
},
|
},
|
||||||
{"priority": "normal"},
|
{"priority": "normal"},
|
||||||
list(
|
list(
|
||||||
@@ -724,7 +723,6 @@ class HandlePushNotificationTest(PushNotificationTestCase):
|
|||||||
"user_id": self.user_profile.id,
|
"user_id": self.user_profile.id,
|
||||||
"event": "remove",
|
"event": "remove",
|
||||||
"zulip_message_ids": str(message.id),
|
"zulip_message_ids": str(message.id),
|
||||||
"zulip_message_id": message.id,
|
|
||||||
},
|
},
|
||||||
{"priority": "normal"},
|
{"priority": "normal"},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user