summary refs log tree commit diff
path: root/synapse/handlers/events.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-19 13:50:40 +0100
committerErik Johnston <erik@matrix.org>2015-08-19 13:50:40 +0100
commit09d23b620951ae07c7aa7ff99fe96a0b173d1397 (patch)
tree3a8cc39f417fcaad2c88da5782536d99e495c124 /synapse/handlers/events.py
parentRemove an access token log line (diff)
parentDon't get apservice interested rooms in RoomHandler.get_joined_rooms_for_users (diff)
downloadsynapse-09d23b620951ae07c7aa7ff99fe96a0b173d1397.tar.xz
Merge pull request #232 from matrix-org/erikj/appservice_joined_rooms
Don't get apservice interested rooms in RoomHandler.get_joined_rooms_for_users
Diffstat (limited to 'synapse/handlers/events.py')
-rw-r--r--synapse/handlers/events.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py
index 993d33ba47..f9ca2f8634 100644
--- a/synapse/handlers/events.py
+++ b/synapse/handlers/events.py
@@ -70,7 +70,15 @@ class EventStreamHandler(BaseHandler):
                 self._streams_per_user[auth_user] += 1
 
             rm_handler = self.hs.get_handlers().room_member_handler
-            room_ids = yield rm_handler.get_joined_rooms_for_user(auth_user)
+
+            app_service = yield self.store.get_app_service_by_user_id(
+                auth_user.to_string()
+            )
+            if app_service:
+                rooms = yield self.store.get_app_service_rooms(app_service)
+                room_ids = set(r.room_id for r in rooms)
+            else:
+                room_ids = yield rm_handler.get_joined_rooms_for_user(auth_user)
 
             if timeout:
                 # If they've set a timeout set a minimum limit.