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.

notification_data: Annotate `flags` with `Collection`.

Abhijeet Prasad Bodasaeb2ad5f460d
diff --git a/zerver/lib/notification_data.py b/zerver/lib/notification_data.py
index 6ec0e6b5505..db59f6de4ea 100644
--- a/zerver/lib/notification_data.py
+++ b/zerver/lib/notification_data.py
@@ -1,11 +1,11 @@
from dataclasses import dataclass
-from typing import List
+from typing import Collection
@dataclass
class UserMessageNotificationsData:
id: int
- flags: List[str]
+ flags: Collection[str]
mentioned: bool
online_push_enabled: bool
stream_push_notify: bool
diff --git a/zerver/tornado/event_queue.py b/zerver/tornado/event_queue.py
index 8f02e4b42b8..a65d25048cb 100644
--- a/zerver/tornado/event_queue.py
+++ b/zerver/tornado/event_queue.py
@@ -948,7 +948,7 @@ def process_message_event(
for user_data in users:
user_profile_id: int = user_data["id"]
- flags: Iterable[str] = user_data.get("flags", [])
+ flags: Collection[str] = user_data.get("flags", [])
# If the recipient was offline and the message was a single or group PM to them
# or they were @-notified potentially notify more immediately