diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index 2c555a66d066..5d8437aa78bb 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -410,11 +410,11 @@ async def current_sync_for_user( set_tag(SynapseTags.SYNC_RESULT, bool(sync_result)) return sync_result - async def push_rules_for_user(self, user: UserID) -> JsonDict: + async def push_rules_for_user(self, user: UserID) -> Dict[str, Dict[str, list]]: user_id = user.to_string() rules = await self.store.get_push_rules_for_user(user_id) - rules = format_push_rules_for_user(user, rules) - return rules + result = format_push_rules_for_user(user, rules) + return result async def ephemeral_by_room( self, diff --git a/synapse/storage/databases/main/roommember.py b/synapse/storage/databases/main/roommember.py index b02fb4d2879b..031f7f4dddbb 100644 --- a/synapse/storage/databases/main/roommember.py +++ b/synapse/storage/databases/main/roommember.py @@ -51,7 +51,7 @@ ProfileInfo, RoomsForUser, ) -from synapse.types import JsonDict, PersistedEventPosition, StateMap, get_domain_from_id +from synapse.types import PersistedEventPosition, StateMap, get_domain_from_id from synapse.util.async_helpers import Linearizer from synapse.util.caches import intern_string from synapse.util.caches.descriptors import _CacheContext, cached, cachedList