This commit is contained in:
Erik Johnston 2017-03-16 13:04:07 +00:00
parent a158c36a8a
commit da146657c9
2 changed files with 4 additions and 2 deletions

View File

@ -832,8 +832,8 @@ class SyncHandler(object):
@defer.inlineCallbacks @defer.inlineCallbacks
def _have_rooms_changed(self, sync_result_builder): def _have_rooms_changed(self, sync_result_builder):
"""Returns whether any rooms have changed since the sync. Must be an """Returns whether there may be any new events that should be sent down
incremental sync the sync. Returns True if there are.
""" """
user_id = sync_result_builder.sync_config.user.to_string() user_id = sync_result_builder.sync_config.user.to_string()
since_token = sync_result_builder.since_token since_token = sync_result_builder.since_token

View File

@ -276,6 +276,8 @@ class RoomMemberStore(SQLBaseStore):
@cachedInlineCallbacks(max_entries=500000, iterable=True) @cachedInlineCallbacks(max_entries=500000, iterable=True)
def get_rooms_for_user(self, user_id): def get_rooms_for_user(self, user_id):
"""Returns a set of room_ids the user is currently joined to
"""
rooms = yield self.get_rooms_for_user_where_membership_is( rooms = yield self.get_rooms_for_user_where_membership_is(
user_id, membership_list=[Membership.JOIN], user_id, membership_list=[Membership.JOIN],
) )