forked from MirrorHub/synapse
Have MemoryDataStore's get_rooms_for_user_where_membership_is() return room membership event objects, as per interface contract
This commit is contained in:
parent
fd696f1243
commit
59d3955db1
|
@ -188,8 +188,9 @@ class MemoryDataStore(object):
|
||||||
|
|
||||||
def get_rooms_for_user_where_membership_is(self, user_id, membership_list):
|
def get_rooms_for_user_where_membership_is(self, user_id, membership_list):
|
||||||
return [
|
return [
|
||||||
r for r in self.members
|
self.members[r].get(user_id) for r in self.members
|
||||||
if self.members[r].get(user_id).membership in membership_list
|
if user_id in self.members[r] and
|
||||||
|
self.members[r][user_id].membership in membership_list
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_room_events_stream(self, user_id=None, from_key=None, to_key=None,
|
def get_room_events_stream(self, user_id=None, from_key=None, to_key=None,
|
||||||
|
|
Loading…
Reference in a new issue