mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Use get_room_events_stream to get changes to the rooms if the number of changes is small
This commit is contained in:
parent
e3e72b8c5c
commit
e016f4043b
2 changed files with 52 additions and 11 deletions
|
@ -181,6 +181,13 @@ class StreamStore(SQLBaseStore):
|
|||
get_prev_content=True
|
||||
)
|
||||
|
||||
for event, row in zip(ret, rows):
|
||||
stream = row["stream_ordering"]
|
||||
topo = event.depth
|
||||
internal = event.internal_metadata
|
||||
internal.before = str(_StreamToken(topo, stream - 1))
|
||||
internal.after = str(_StreamToken(topo, stream))
|
||||
|
||||
if rows:
|
||||
key = "s%d" % max([r["stream_ordering"] for r in rows])
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue