Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

push_notifications: Assert observation written in comment.

Abhijeet Prasad Bodasee424c1f76a5
diff --git a/zerver/lib/push_notifications.py b/zerver/lib/push_notifications.py
index 499514e8763..9574377021d 100644
--- a/zerver/lib/push_notifications.py
+++ b/zerver/lib/push_notifications.py
@@ -565,7 +565,8 @@ def get_gcm_alert(message: Message) -> str:
message.trigger == "mentioned" or message.trigger == "wildcard_mentioned"
):
return f"New mention from {sender_str}"
- else: # message.is_stream_message() and message.trigger == 'stream_push_notify'
+ else:
+ assert message.is_stream_message() and message.trigger == "stream_push_notify"
return f"New stream message from {sender_str} in {get_display_recipient(message.recipient)}"