summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2017-03-01 17:20:37 +0000
committerDavid Baker <dave@matrix.org>2017-03-01 17:20:37 +0000
commit3557cf34dc011211db1b80016ce09ada86b41ffc (patch)
tree9ff6c82f81d7a932ffc1d66d677a5cfa65157494 /synapse/handlers/room.py
parentWIP support for msisdn 3pid proxy methods (diff)
parentkick jenkins (diff)
downloadsynapse-3557cf34dc011211db1b80016ce09ada86b41ffc.tar.xz
Merge remote-tracking branch 'origin/develop' into dbkr/msisdn_signin
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 7e7671c9a2..99cb7db0db 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -356,7 +356,7 @@ class RoomCreationHandler(BaseHandler):
 
 class RoomContextHandler(BaseHandler):
     @defer.inlineCallbacks
-    def get_event_context(self, user, room_id, event_id, limit, is_guest):
+    def get_event_context(self, user, room_id, event_id, limit):
         """Retrieves events, pagination tokens and state around a given event
         in a room.
 
@@ -375,12 +375,15 @@ class RoomContextHandler(BaseHandler):
 
         now_token = yield self.hs.get_event_sources().get_current_token()
 
+        users = yield self.store.get_users_in_room(room_id)
+        is_peeking = user.to_string() not in users
+
         def filter_evts(events):
             return filter_events_for_client(
                 self.store,
                 user.to_string(),
                 events,
-                is_peeking=is_guest
+                is_peeking=is_peeking
             )
 
         event = yield self.store.get_event(event_id, get_prev_content=True,