summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-15 13:26:05 +0100
committerErik Johnston <erik@matrix.org>2014-09-15 13:26:11 +0100
commit5bd9369a62c6d6cf677e9eef7d58096449542cdf (patch)
tree96b9ed79f774a2fc38b5a8345385b0246197087b /synapse/rest
parentBF: inviter field has moved to the room root object (diff)
downloadsynapse-5bd9369a62c6d6cf677e9eef7d58096449542cdf.tar.xz
Correctly handle the 'age' key in events and pdus
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/events.py2
-rw-r--r--synapse/rest/room.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/events.py b/synapse/rest/events.py
index 7fde143200..097195d7cc 100644
--- a/synapse/rest/events.py
+++ b/synapse/rest/events.py
@@ -59,7 +59,7 @@ class EventRestServlet(RestServlet):
         event = yield handler.get_event(auth_user, event_id)
 
         if event:
-            defer.returnValue((200, event.get_dict()))
+            defer.returnValue((200, self.hs.serialize_event(event)))
         else:
             defer.returnValue((404, "Event not found."))
 
diff --git a/synapse/rest/room.py b/synapse/rest/room.py
index cef700c81c..ecb1e346d9 100644
--- a/synapse/rest/room.py
+++ b/synapse/rest/room.py
@@ -378,7 +378,7 @@ class RoomTriggerBackfill(RestServlet):
         handler = self.handlers.federation_handler
         events = yield handler.backfill(remote_server, room_id, limit)
 
-        res = [event.get_dict() for event in events]
+        res = [self.hs.serialize_event(event) for event in events]
         defer.returnValue((200, res))