notification_data: Annotate flags with Collection.

Since `flags` here could be iterated through multiple times
(to check for push/email notifiability), we use `Collection`.
Inspired by 871e73ab8f.

The other change here in the `event_queue` code is prep for using
the `UserMessageNotificationsData` class there.
This commit is contained in:
Abhijeet Prasad Bodas
2021-06-21 18:55:47 +05:30
committed by Tim Abbott
parent 8182632d7e
commit aeb2ad5f46
2 changed files with 3 additions and 3 deletions

View File

@@ -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