summary refs log tree commit diff
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
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
-rw-r--r--CHANGES.rst7
-rw-r--r--synapse/__init__.py2
-rw-r--r--synapse/handlers/room.py7
-rw-r--r--synapse/rest/client/v1/room.py1
4 files changed, 13 insertions, 4 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 22aa7cb9b4..c8856d9575 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,10 @@
+Changes in synapse v0.19.2 (2017-02-20)
+=======================================
+
+* Fix bug with event visibility check in /context/ API. Thanks to Tokodomo for
+  pointing it out! (PR #1929)
+
+
 Changes in synapse v0.19.1 (2017-02-09)
 =======================================
 
diff --git a/synapse/__init__.py b/synapse/__init__.py
index da8ef90a77..ff251ce597 100644
--- a/synapse/__init__.py
+++ b/synapse/__init__.py
@@ -16,4 +16,4 @@
 """ This is a reference implementation of a Matrix home server.
 """
 
-__version__ = "0.19.1"
+__version__ = "0.19.2"
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,
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index 2ebf5e59a0..6554f57df1 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -505,7 +505,6 @@ class RoomEventContext(ClientV1RestServlet):
             room_id,
             event_id,
             limit,
-            requester.is_guest,
         )
 
         if not results: