Don't get apservice interested rooms in RoomHandler.get_joined_rooms_for_users

This commit is contained in:
Erik Johnston 2015-08-19 13:46:03 +01:00
parent 40da1f200d
commit daa01842f8
3 changed files with 32 additions and 12 deletions

View file

@ -557,15 +557,9 @@ class RoomMemberHandler(BaseHandler):
"""Returns a list of roomids that the user has any of the given
membership states in."""
app_service = yield self.store.get_app_service_by_user_id(
user.to_string()
rooms = yield self.store.get_rooms_for_user(
user.to_string(),
)
if app_service:
rooms = yield self.store.get_app_service_rooms(app_service)
else:
rooms = yield self.store.get_rooms_for_user(
user.to_string(),
)
# For some reason the list of events contains duplicates
# TODO(paul): work out why because I really don't think it should