summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-02-20 14:54:50 +0000
committerErik Johnston <erik@matrix.org>2017-02-20 16:01:49 +0000
commitefff39c03013f4cd5303466440d84484f338cb57 (patch)
tree2a8d548a082f66e17be7f3247f52b073fac6489a /synapse
parentUpdate metrics-howto.rst (diff)
downloadsynapse-efff39c03013f4cd5303466440d84484f338cb57.tar.xz
Fix /context/ visibiltiy rules
Diffstat (limited to '')
-rw-r--r--synapse/handlers/room.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 7e7671c9a2..73bc73a45e 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -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,