summary refs log tree commit diff
path: root/synapse/handlers/events.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-01-26 16:11:28 +0000
committerMark Haines <mark.haines@matrix.org>2015-01-26 16:11:28 +0000
commit7f6f3f9d6247076493c4e9d48c8282e25892f8b5 (patch)
treeb11995b879aa075b79b5899bf33e4f119f8db74d /synapse/handlers/events.py
parentAdd client v2_alpha resource to synapse server resource tree (diff)
downloadsynapse-7f6f3f9d6247076493c4e9d48c8282e25892f8b5.tar.xz
Pass the current time to serialize event, rather than passing an
HS and getting a clock from it and calling time_msec on the clock.
Remove the serialize_event method from the HS since it is no longer
needed.
Diffstat (limited to 'synapse/handlers/events.py')
-rw-r--r--synapse/handlers/events.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py
index 01e67b0818..d997917cd6 100644
--- a/synapse/handlers/events.py
+++ b/synapse/handlers/events.py
@@ -18,6 +18,7 @@ from twisted.internet import defer
 from synapse.util.logcontext import PreserveLoggingContext
 from synapse.util.logutils import log_function
 from synapse.types import UserID
+from synapse.events.utils import serialize_event
 
 from ._base import BaseHandler
 
@@ -78,8 +79,10 @@ class EventStreamHandler(BaseHandler):
                     auth_user, room_ids, pagin_config, timeout
                 )
 
+            time_now = self.clock.time_msec()
+
             chunks = [
-                self.hs.serialize_event(e, as_client_event) for e in events
+                serialize_event(e, time_now, as_client_event) for e in events
             ]
 
             chunk = {