mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-16 15:02:15 -04:00
Skip calculating unread push actions in /sync
when enable_push
is false. (#14980)
This commit is contained in:
parent
db2b105d69
commit
f09db5c991
3 changed files with 16 additions and 0 deletions
|
@ -203,11 +203,18 @@ class RoomNotifCounts:
|
|||
# Map of thread ID to the notification counts.
|
||||
threads: Dict[str, NotifCounts]
|
||||
|
||||
@staticmethod
|
||||
def empty() -> "RoomNotifCounts":
|
||||
return _EMPTY_ROOM_NOTIF_COUNTS
|
||||
|
||||
def __len__(self) -> int:
|
||||
# To properly account for the amount of space in any caches.
|
||||
return len(self.threads) + 1
|
||||
|
||||
|
||||
_EMPTY_ROOM_NOTIF_COUNTS = RoomNotifCounts(NotifCounts(), {})
|
||||
|
||||
|
||||
def _serialize_action(
|
||||
actions: Collection[Union[Mapping, str]], is_highlight: bool
|
||||
) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue