0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-16 03:53:50 +01:00

Use iteritems

This commit is contained in:
Erik Johnston 2017-04-06 15:51:12 +01:00
parent 944692ef69
commit 877c029c16

View file

@ -596,14 +596,14 @@ class PresenceHandler(object):
for user_id in user_ids
}
missing = [user_id for user_id, state in states.items() if not state]
missing = [user_id for user_id, state in states.iteritems() if not state]
if missing:
# There are things not in our in memory cache. Lets pull them out of
# the database.
res = yield self.store.get_presence_for_users(missing)
states.update(res)
missing = [user_id for user_id, state in states.items() if not state]
missing = [user_id for user_id, state in states.iteritems() if not state]
if missing:
new = {
user_id: UserPresenceState.default(user_id)