diff options
author | Erik Johnston <erik@matrix.org> | 2017-05-05 10:17:56 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-05-05 10:17:56 +0100 |
commit | cf589f2c1e68b71db80cbc2cf56f88118faf545b (patch) | |
tree | 1a5c0fd0c0f63b7cedc7d1224e3307122a3d7285 /synapse | |
parent | Add comment (diff) | |
download | synapse-cf589f2c1e68b71db80cbc2cf56f88118faf545b.tar.xz |
Fixes
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/roommember.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index dcb95b924a..c63c0622dd 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -427,8 +427,9 @@ class RoomMemberStore(SQLBaseStore): missing_member_event_ids = [] users_in_room = {} - for event_id, ev_entry in event_map.iteritems(): - if event_id: + for event_id in member_event_ids: + ev_entry = event_map.get(event_id) + if ev_entry: if ev_entry.event.membership == Membership.JOIN: users_in_room[to_ascii(ev_entry.event.state_key)] = ProfileInfo( display_name=to_ascii( @@ -445,7 +446,7 @@ class RoomMemberStore(SQLBaseStore): rows = yield self._simple_select_many_batch( table="room_memberships", column="event_id", - iterable=member_event_ids, + iterable=missing_member_event_ids, retcols=('user_id', 'display_name', 'avatar_url',), keyvalues={ "membership": Membership.JOIN, |