summary refs log tree commit diff
path: root/synapse/handlers
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 14:54:50 +0000
commit7f026792e12b7ca0d24ca4c8ed9ed239bf8a99ac (patch)
tree7b61033c24e2dc505d501897db38dd18edfad510 /synapse/handlers
parentFix up notif rotation (diff)
downloadsynapse-7f026792e12b7ca0d24ca4c8ed9ed239bf8a99ac.tar.xz
Fix /context/ visibiltiy rules
Diffstat (limited to 'synapse/handlers')
-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,