summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-02-21 13:45:02 +0000
committerErik Johnston <erik@matrix.org>2017-02-21 13:45:02 +0000
commit3346a213241544faa48b1243906452a646f93a4a (patch)
tree9b94212dbce78d9bc1e82cf99204518fc72fe5ed /synapse/handlers/room.py
parentUpdate metrics-howto.rst (diff)
parentBump version and changelog (diff)
downloadsynapse-3346a213241544faa48b1243906452a646f93a4a.tar.xz
Merge branch 'release-v0.19.2' of github.com:matrix-org/synapse v0.19.2
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,