mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 21:32:46 +00:00
State handling tweaks (#2652)
This tweaks how rejected events are handled in room state and also to not apply checks we can't complete to outliers.
This commit is contained in:
parent
606cb67506
commit
6b48ce0d75
9 changed files with 92 additions and 53 deletions
|
@ -102,7 +102,7 @@ func Test_EventsTable(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
stateEvents, err := tab.BulkSelectStateEventByID(ctx, nil, eventIDs)
|
||||
stateEvents, err := tab.BulkSelectStateEventByID(ctx, nil, eventIDs, false)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, len(stateEvents), len(eventIDs))
|
||||
nids := make([]types.EventNID, 0, len(stateEvents))
|
||||
|
|
|
@ -46,7 +46,7 @@ type Events interface {
|
|||
SelectEvent(ctx context.Context, txn *sql.Tx, eventID string) (types.EventNID, types.StateSnapshotNID, error)
|
||||
// bulkSelectStateEventByID lookups a list of state events by event ID.
|
||||
// If any of the requested events are missing from the database it returns a types.MissingEventError
|
||||
BulkSelectStateEventByID(ctx context.Context, txn *sql.Tx, eventIDs []string) ([]types.StateEntry, error)
|
||||
BulkSelectStateEventByID(ctx context.Context, txn *sql.Tx, eventIDs []string, excludeRejected bool) ([]types.StateEntry, error)
|
||||
BulkSelectStateEventByNID(ctx context.Context, txn *sql.Tx, eventNIDs []types.EventNID, stateKeyTuples []types.StateKeyTuple) ([]types.StateEntry, error)
|
||||
// BulkSelectStateAtEventByID lookups the state at a list of events by event ID.
|
||||
// If any of the requested events are missing from the database it returns a types.MissingEventError.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue