diff options
author | David Teller <d.o.teller+github@gmail.com> | 2021-01-25 18:02:35 +0100 |
---|---|---|
committer | David Teller <d.o.teller+github@gmail.com> | 2021-01-28 12:31:07 +0100 |
commit | de7f049527c64470a16b2633862a1f1b8f0da9c2 (patch) | |
tree | 1aeba9a13bd3d023e368c00fb88268f800564bf7 /synapse/handlers/room.py | |
parent | FIXUP: Documenting /_synapse/admin/v1/rooms/<room_id>/context/<event_id> (diff) | |
download | synapse-de7f049527c64470a16b2633862a1f1b8f0da9c2.tar.xz |
FIXUP: Don't filter events at all for admin/v1/rooms/.../context/...
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 15e90fdd4e..b02056dc63 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -52,7 +52,7 @@ from synapse.types import ( create_requester, ) from synapse.util import stringutils -from synapse.util.async_helpers import Linearizer +from synapse.util.async_helpers import Linearizer, maybe_awaitable from synapse.util.caches.response_cache import ResponseCache from synapse.util.stringutils import parse_and_validate_server_name from synapse.visibility import filter_events_for_client @@ -1034,12 +1034,10 @@ class RoomContextHandler: is_peeking = user.to_string() not in users def filter_evts(events): + if use_admin_priviledge: + return maybe_awaitable(events) return filter_events_for_client( - self.storage, - user.to_string(), - events, - is_peeking=is_peeking, - use_admin_priviledge=use_admin_priviledge, + self.storage, user.to_string(), events, is_peeking=is_peeking ) event = await self.store.get_event( |