Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed May 5, 2017
1 parent aa93cb9 commit cf589f2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions synapse/storage/roommember.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,9 @@ def _get_joined_users_from_context(self, room_id, state_group, current_state_ids

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(
Expand All @@ -445,7 +446,7 @@ def _get_joined_users_from_context(self, room_id, state_group, current_state_ids
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,
Expand Down

0 comments on commit cf589f2

Please sign in to comment.