diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-12-15 11:10:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 11:10:02 -0500 |
commit | 323151b787cbc511919dd54a3acea76dc2ad0603 (patch) | |
tree | 8c5a8de579db53329c35971e1a01f189535b3384 /synapse/handlers/events.py | |
parent | Add experimental support for MSC3202: allowing application services to masque... (diff) | |
download | synapse-323151b787cbc511919dd54a3acea76dc2ad0603.tar.xz |
Convert EventStreamResult to attrs. (#11574)
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/events.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py index 32b0254c5f..afed80ba14 100644 --- a/synapse/handlers/events.py +++ b/synapse/handlers/events.py @@ -79,13 +79,14 @@ class EventStreamHandler: # thundering herds on restart. timeout = random.randint(int(timeout * 0.9), int(timeout * 1.1)) - events, tokens = await self.notifier.get_events_for( + stream_result = await self.notifier.get_events_for( auth_user, pagin_config, timeout, is_guest=is_guest, explicit_room_id=room_id, ) + events = stream_result.events time_now = self.clock.time_msec() @@ -128,8 +129,8 @@ class EventStreamHandler: chunk = { "chunk": chunks, - "start": await tokens[0].to_string(self.store), - "end": await tokens[1].to_string(self.store), + "start": await stream_result.start_token.to_string(self.store), + "end": await stream_result.end_token.to_string(self.store), } return chunk |