diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-10-22 10:39:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-22 10:39:16 +0100 |
commit | 3afc623098dc2cc24093466f69e1d9c4bac9d35b (patch) | |
tree | 401f20e9ab2c47a1caef5e295f374118ecfcb7d3 /syncapi/consumers | |
parent | 04dc019e5e2f60cd387699bb7f4f7eead15ba714 (diff) |
Fix RewritesState bug (#1557)
* Set RewritesState once
* Check if any new state provided
* Obey rewritesState
* Don't nuke everything the sync API knows when purging state
* Fix panic from duplicate insert
* Consistency
* Use HasState
* Remove nolint
* Clean up joined rooms on state rewrite
Diffstat (limited to 'syncapi/consumers')
-rw-r--r-- | syncapi/consumers/roomserver.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/syncapi/consumers/roomserver.go b/syncapi/consumers/roomserver.go index 373baea5..593bfc5c 100644 --- a/syncapi/consumers/roomserver.go +++ b/syncapi/consumers/roomserver.go @@ -149,7 +149,7 @@ func (s *OutputRoomEventConsumer) onNewRoomEvent( } if msg.RewritesState { - if err = s.db.PurgeRoom(ctx, ev.RoomID()); err != nil { + if err = s.db.PurgeRoomState(ctx, ev.RoomID()); err != nil { return fmt.Errorf("s.db.PurgeRoom: %w", err) } } |