mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 07:02:15 -04:00
Implementation of state rollback in /sync
Implementation of SPEC-254: roll back the state dictionary to how it looked at the start of the timeline. Merged PR https://github.com/matrix-org/synapse/pull/373
This commit is contained in:
parent
fddedd51d9
commit
e4d622aaaf
2 changed files with 69 additions and 4 deletions
|
@ -831,7 +831,8 @@ class EventsStore(SQLBaseStore):
|
|||
allow_none=True,
|
||||
)
|
||||
if prev:
|
||||
ev.unsigned["prev_content"] = prev.get_dict()["content"]
|
||||
ev.unsigned["prev_content"] = prev.content
|
||||
ev.unsigned["prev_sender"] = prev.sender
|
||||
|
||||
self._get_event_cache.prefill(
|
||||
(ev.event_id, check_redacted, get_prev_content), ev
|
||||
|
@ -888,7 +889,8 @@ class EventsStore(SQLBaseStore):
|
|||
get_prev_content=False,
|
||||
)
|
||||
if prev:
|
||||
ev.unsigned["prev_content"] = prev.get_dict()["content"]
|
||||
ev.unsigned["prev_content"] = prev.content
|
||||
ev.unsigned["prev_sender"] = prev.sender
|
||||
|
||||
self._get_event_cache.prefill(
|
||||
(ev.event_id, check_redacted, get_prev_content), ev
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue