summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2016-09-09 14:40:15 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2016-09-09 14:40:15 +0100
commitd271383e636e0c61d7e89d9baee84358ae32b5ad (patch)
tree1ea90fb71430c1cdb2f30991a6723f3aeeff826b /synapse/rest
parentAllow clients to specify the format a room state event is returned in (diff)
downloadsynapse-d271383e636e0c61d7e89d9baee84358ae32b5ad.tar.xz
Filter returned events for client-facing format
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v1/room.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index 2d7d89da04..22d6a7d31e 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -22,7 +22,7 @@ from synapse.streams.config import PaginationConfig
 from synapse.api.constants import EventTypes, Membership
 from synapse.api.filtering import Filter
 from synapse.types import UserID, RoomID, RoomAlias
-from synapse.events.utils import serialize_event
+from synapse.events.utils import serialize_event, format_event_for_client_v2
 from synapse.http.servlet import parse_json_object_from_request, parse_string
 
 import logging
@@ -138,7 +138,8 @@ class RoomStateEventRestServlet(ClientV1RestServlet):
             )
 
         if format == "event":
-            defer.returnValue((200, data.get_dict()))
+            event = format_event_for_client_v2(data.get_dict())
+            defer.returnValue((200, event))
         elif format == "content":
             defer.returnValue((200, data.get_dict()["content"]))