mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy (#3307)
This commit is contained in:
parent
872cf43516
commit
c936a52a9e
29 changed files with 116 additions and 101 deletions
|
@ -541,11 +541,11 @@ class SyncHandler(object):
|
|||
|
||||
state = {}
|
||||
if state_ids:
|
||||
state = yield self.store.get_events(state_ids.values())
|
||||
state = yield self.store.get_events(list(state_ids.values()))
|
||||
|
||||
defer.returnValue({
|
||||
(e.type, e.state_key): e
|
||||
for e in sync_config.filter_collection.filter_room_state(state.values())
|
||||
for e in sync_config.filter_collection.filter_room_state(list(state.values()))
|
||||
})
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
@ -894,7 +894,7 @@ class SyncHandler(object):
|
|||
presence.extend(states)
|
||||
|
||||
# Deduplicate the presence entries so that there's at most one per user
|
||||
presence = {p.user_id: p for p in presence}.values()
|
||||
presence = list({p.user_id: p for p in presence}.values())
|
||||
|
||||
presence = sync_config.filter_collection.filter_presence(
|
||||
presence
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue