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.
This commit is contained in:
Mark Haines 2015-01-26 16:11:28 +00:00
parent 7b814d3f7f
commit 7f6f3f9d62
7 changed files with 45 additions and 20 deletions

View file

@ -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 = {