aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/interface.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-10-22 10:39:16 +0100
committerGitHub <noreply@github.com>2020-10-22 10:39:16 +0100
commit3afc623098dc2cc24093466f69e1d9c4bac9d35b (patch)
tree401f20e9ab2c47a1caef5e295f374118ecfcb7d3 /syncapi/storage/interface.go
parent04dc019e5e2f60cd387699bb7f4f7eead15ba714 (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/storage/interface.go')
-rw-r--r--syncapi/storage/interface.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/syncapi/storage/interface.go b/syncapi/storage/interface.go
index ce7f1c15..e12a1166 100644
--- a/syncapi/storage/interface.go
+++ b/syncapi/storage/interface.go
@@ -43,9 +43,9 @@ type Database interface {
// Returns an error if there was a problem inserting this event.
WriteEvent(ctx context.Context, ev *gomatrixserverlib.HeaderedEvent, addStateEvents []gomatrixserverlib.HeaderedEvent,
addStateEventIDs []string, removeStateEventIDs []string, transactionID *api.TransactionID, excludeFromSync bool) (types.StreamPosition, error)
- // PurgeRoom completely purges room state from the sync API. This is done when
+ // PurgeRoomState completely purges room state from the sync API. This is done when
// receiving an output event that completely resets the state.
- PurgeRoom(ctx context.Context, roomID string) error
+ PurgeRoomState(ctx context.Context, roomID string) error
// GetStateEvent returns the Matrix state event of a given type for a given room with a given state key
// If no event could be found, returns nil
// If there was an issue during the retrieval, returns an error