mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 05:06:02 -04:00
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:
parent
7b814d3f7f
commit
7f6f3f9d62
7 changed files with 45 additions and 20 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue