diff options
author | Daniel Wagner-Hall <dawagner@gmail.com> | 2015-11-11 17:49:44 +0000 |
---|---|---|
committer | Daniel Wagner-Hall <dawagner@gmail.com> | 2015-11-11 17:49:44 +0000 |
commit | e93d550b79e7e485bb2866ef956fca2379cefac7 (patch) | |
tree | b3b103dc590f581d060e7e5ca22c35f3fc47b890 /synapse/handlers/room.py | |
parent | Merge pull request #358 from matrix-org/daniel/publicwritable (diff) | |
download | synapse-e93d550b79e7e485bb2866ef956fca2379cefac7.tar.xz |
Allow guests to access room context API
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 7d18218cd9..0266926fc7 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -765,7 +765,7 @@ class RoomListHandler(BaseHandler): class RoomContextHandler(BaseHandler): @defer.inlineCallbacks - def get_event_context(self, user, room_id, event_id, limit): + def get_event_context(self, user, room_id, event_id, limit, is_guest): """Retrieves events, pagination tokens and state around a given event in a room. @@ -789,11 +789,17 @@ class RoomContextHandler(BaseHandler): ) results["events_before"] = yield self._filter_events_for_client( - user.to_string(), results["events_before"] + user.to_string(), + results["events_before"], + is_guest=is_guest, + require_all_visible_for_guests=False ) results["events_after"] = yield self._filter_events_for_client( - user.to_string(), results["events_after"] + user.to_string(), + results["events_after"], + is_guest=is_guest, + require_all_visible_for_guests=False ) if results["events_after"]: |