mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:26:09 -04:00
Merge branch 'develop' into pushers
Conflicts: synapse/handlers/events.py synapse/server.py
This commit is contained in:
commit
c291a4d522
51 changed files with 527 additions and 299 deletions
|
@ -17,6 +17,8 @@ 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
|
||||
|
||||
|
@ -48,7 +50,7 @@ class EventStreamHandler(BaseHandler):
|
|||
@log_function
|
||||
def get_stream(self, auth_user_id, pagin_config, timeout=0,
|
||||
as_client_event=True, affect_presence=True):
|
||||
auth_user = self.hs.parse_userid(auth_user_id)
|
||||
auth_user = UserID.from_string(auth_user_id)
|
||||
|
||||
try:
|
||||
if affect_presence:
|
||||
|
@ -78,8 +80,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