mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 03:44:14 -04:00
Disable calculating unread counts unless the config flag is enabled. (#13694)
This avoids doing work that will never be used (since the resulting unread counts will never be sent in a /sync response). The negative of doing this is that unread counts will be incorrect when the feature is initially enabled.
This commit is contained in:
parent
f48f4dd59e
commit
390b7ce946
4 changed files with 30 additions and 23 deletions
|
@ -262,7 +262,12 @@ class BulkPushRuleEvaluator:
|
|||
# This can happen due to out of band memberships
|
||||
return
|
||||
|
||||
count_as_unread = _should_count_as_unread(event, context)
|
||||
# Disable counting as unread unless the experimental configuration is
|
||||
# enabled, as it can cause additional (unwanted) rows to be added to the
|
||||
# event_push_actions table.
|
||||
count_as_unread = False
|
||||
if self.hs.config.experimental.msc2654_enabled:
|
||||
count_as_unread = _should_count_as_unread(event, context)
|
||||
|
||||
rules_by_user = await self._get_rules_for_event(event)
|
||||
actions_by_user: Dict[str, Collection[Union[Mapping, str]]] = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue