summary refs log tree commit diff
path: root/synapse/handlers/events.py
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/handlers/events.py
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/handlers/events.py')
-rw-r--r--synapse/handlers/events.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py
index fd24a11fb8..93dcd40324 100644
--- a/synapse/handlers/events.py
+++ b/synapse/handlers/events.py
@@ -15,7 +15,6 @@
 
 from twisted.internet import defer
 
-from synapse.api.events import SynapseEvent
 from synapse.util.logutils import log_function
 
 from ._base import BaseHandler
@@ -71,10 +70,7 @@ class EventStreamHandler(BaseHandler):
                 auth_user, room_ids, pagin_config, timeout
             )
 
-            chunks = [
-                e.get_dict() if isinstance(e, SynapseEvent) else e
-                for e in events
-            ]
+            chunks = [self.hs.serialize_event(e) for e in events]
 
             chunk = {
                 "chunk": chunks,
@@ -92,7 +88,9 @@ class EventStreamHandler(BaseHandler):
                 # 10 seconds of grace to allow the client to reconnect again
                 #   before we think they're gone
                 def _later():
-                    logger.debug("_later stopped_user_eventstream %s", auth_user)
+                    logger.debug(
+                        "_later stopped_user_eventstream %s", auth_user
+                    )
                     self.distributor.fire(
                         "stopped_user_eventstream", auth_user
                     )