mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 00:23:49 +00:00
push_notification: Remove 'content_truncated' field from FCM payload.
This commit removes the 'content_truncated' field from the FCM payload to send push notification as it was unused by clients.
This commit is contained in:
committed by
Tim Abbott
parent
c9edb9c9ce
commit
dd134ef325
@@ -28,6 +28,8 @@ format used by the Zulip server that they are interacting with.
|
||||
notifications no longer contain the legacy pre-2019
|
||||
`zulip_message_id` field; all functional clients support the newer
|
||||
`zulip_message_ids`.
|
||||
* Mobile push notification payloads for FCM to for new messages no
|
||||
longer contain the (unused) `content_truncated` boolean field.
|
||||
|
||||
**Feature level 412**
|
||||
|
||||
|
||||
@@ -1180,13 +1180,12 @@ def get_message_payload_gcm(
|
||||
|
||||
assert message.rendered_content is not None
|
||||
with override_language(user_profile.default_language):
|
||||
content, truncated = truncate_content(get_mobile_push_content(message.rendered_content))
|
||||
content, unused = truncate_content(get_mobile_push_content(message.rendered_content))
|
||||
data.update(
|
||||
event="message",
|
||||
zulip_message_id=message.id, # message_id is reserved for CCS
|
||||
time=datetime_to_timestamp(message.date_sent),
|
||||
content=content,
|
||||
content_truncated=truncated,
|
||||
sender_full_name=sender_name,
|
||||
sender_avatar_url=sender_avatar_url,
|
||||
)
|
||||
|
||||
@@ -784,7 +784,6 @@ class PushBouncerNotificationTest(BouncerTestCase):
|
||||
"zulip_message_id": message.id,
|
||||
"time": datetime_to_timestamp(message.date_sent),
|
||||
"content": message.content,
|
||||
"content_truncated": False,
|
||||
"server": settings.EXTERNAL_HOST,
|
||||
"realm_id": hamlet.realm.id,
|
||||
"realm_uri": hamlet.realm.url,
|
||||
@@ -1816,7 +1815,6 @@ class TestGetGCMPayload(PushNotificationTestCase):
|
||||
"zulip_message_id": message.id,
|
||||
"time": datetime_to_timestamp(message.date_sent),
|
||||
"content": content,
|
||||
"content_truncated": truncate_content,
|
||||
"server": settings.EXTERNAL_HOST,
|
||||
"realm_id": hamlet.realm.id,
|
||||
"realm_name": hamlet.realm.name,
|
||||
@@ -1879,7 +1877,6 @@ class TestGetGCMPayload(PushNotificationTestCase):
|
||||
"zulip_message_id": message.id,
|
||||
"time": datetime_to_timestamp(message.date_sent),
|
||||
"content": message.content,
|
||||
"content_truncated": False,
|
||||
"server": settings.EXTERNAL_HOST,
|
||||
"realm_id": hamlet.realm.id,
|
||||
"realm_name": hamlet.realm.name,
|
||||
@@ -1927,7 +1924,6 @@ class TestGetGCMPayload(PushNotificationTestCase):
|
||||
"zulip_message_id": message.id,
|
||||
"time": datetime_to_timestamp(message.date_sent),
|
||||
"content": message.content,
|
||||
"content_truncated": False,
|
||||
"server": settings.EXTERNAL_HOST,
|
||||
"realm_id": hamlet.realm.id,
|
||||
"realm_name": hamlet.realm.name,
|
||||
|
||||
Reference in New Issue
Block a user