diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-01-26 16:23:48 +0000 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-01-26 16:23:48 +0000 |
commit | 9b6aaf2074c6a47f673f91926a0ba9faf219e8ce (patch) | |
tree | 15e3c49e081f0182a4ef278afdd6d34695db5cc5 /synapse/handlers/events.py | |
parent | Create (empty) v2_alpha REST tests directory (diff) | |
parent | Remove unused import from server.py (diff) | |
download | synapse-9b6aaf2074c6a47f673f91926a0ba9faf219e8ce.tar.xz |
Merge pull request #34 from matrix-org/remove_serialize_event_from_hs
Don't pass the HS to serialize_event just so that it can get the current time.
Diffstat (limited to 'synapse/handlers/events.py')
-rw-r--r-- | synapse/handlers/events.py | 5 |
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 = { |