mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
Remove superseded invites in the poller
This commit is contained in:
parent
32bc415472
commit
565854d3a7
@ -297,6 +297,10 @@ func (a *Accumulator) Initialise(roomID string, state []json.RawMessage) (Initia
|
||||
}
|
||||
}
|
||||
|
||||
if err = a.invitesTable.RemoveSupersededInvites(txn, roomID, events); err != nil {
|
||||
return fmt.Errorf("RemoveSupersededInvites: %w", err)
|
||||
}
|
||||
|
||||
if err = a.spacesTable.HandleSpaceUpdates(txn, events); err != nil {
|
||||
return fmt.Errorf("HandleSpaceUpdates: %s", err)
|
||||
}
|
||||
@ -545,6 +549,10 @@ func (a *Accumulator) Accumulate(txn *sqlx.Tx, userID, roomID string, timeline s
|
||||
result.RequiresReload = currentStateRedactions > 0
|
||||
}
|
||||
|
||||
if err = a.invitesTable.RemoveSupersededInvites(txn, roomID, postInsertEvents); err != nil {
|
||||
return AccumulateResult{}, fmt.Errorf("RemoveSupersededInvites: %w", err)
|
||||
}
|
||||
|
||||
if err = a.spacesTable.HandleSpaceUpdates(txn, postInsertEvents); err != nil {
|
||||
return AccumulateResult{}, fmt.Errorf("HandleSpaceUpdates: %s", err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user