mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
push_notifications: Fix interface for handle_remove_push_notification.
This really should just accept a message ID.
This commit is contained in:
@@ -548,7 +548,7 @@ def get_gcm_payload(user_profile: UserProfile, message: Message) -> Dict[str, An
|
||||
})
|
||||
return data
|
||||
|
||||
def handle_remove_push_notification(user_profile_id: int, remove_message: Dict[str, Any]) -> None:
|
||||
def handle_remove_push_notification(user_profile_id: int, message_id: int) -> None:
|
||||
"""This should be called when a message that had previously had a
|
||||
mobile push executed is read. This triggers a mobile push notifica
|
||||
mobile app when the message is read on the server, to remove the
|
||||
@@ -556,11 +556,11 @@ def handle_remove_push_notification(user_profile_id: int, remove_message: Dict[s
|
||||
|
||||
"""
|
||||
user_profile = get_user_profile_by_id(user_profile_id)
|
||||
message = access_message(user_profile, remove_message['message_id'])[0]
|
||||
message = access_message(user_profile, message_id)[0]
|
||||
gcm_payload = get_common_payload(message)
|
||||
gcm_payload.update({
|
||||
'event': 'remove',
|
||||
'zulip_message_id': remove_message['message_id'], # message_id is reserved for CCS
|
||||
'zulip_message_id': message_id, # message_id is reserved for CCS
|
||||
})
|
||||
|
||||
if uses_notification_bouncer():
|
||||
|
||||
Reference in New Issue
Block a user