Tweaks to latest events updater (#1045)

* Comment out updaters a bit, add overwrite flag to latest events

* Make sure we don't send fast-forwarded state changes over federation, start with empty set when overwriting

* Remove redundant check for overwrite
This commit is contained in:
Neil Alexander 2020-05-18 17:49:24 +01:00 committed by GitHub
parent 5c221f0655
commit 9ef30bb13b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 101 additions and 23 deletions

View file

@ -75,6 +75,10 @@ func (a StateEntry) LessThan(b StateEntry) bool {
// StateAtEvent is the state before and after a matrix event.
type StateAtEvent struct {
// Should this state overwrite the latest events and memberships of the room?
// This might be necessary when rejoining a federated room after a period of
// absence, as our state and latest events will be out of date.
Overwrite bool
// The state before the event.
BeforeStateSnapshotNID StateSnapshotNID
// The state entry for the event itself, allows us to calculate the state after the event.