mirror of
https://github.com/zulip/zulip.git
synced 2025-11-18 21:48:30 +00:00
push_notification: Fix invalid data arg to firebase_messaging.Message.
Earlier, we were passing invalid `data` argument to `firebase_messaging.Message` which would result in an error while sending E2EE push notification for android devices. The API requires all keys and values in the `data` dictionary to be strings. One of the value was an integer. This commit fixes the bug by converting the values to str if they are not. Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
f5eac9282b
commit
eefb88f0ea
@@ -1447,6 +1447,9 @@ APNsPriority: TypeAlias = Literal[10, 5, 1]
|
||||
|
||||
@dataclass
|
||||
class PushRequestBasePayload:
|
||||
# FCM expects in this type must always be strings. Non-string
|
||||
# fields must be converted into strings in the FCM code path
|
||||
# within send_e2ee_push_notifications.
|
||||
push_account_id: int
|
||||
encrypted_data: str
|
||||
|
||||
|
||||
Reference in New Issue
Block a user