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
|
@ -39,7 +39,7 @@ func CheckForSoftFail(
|
|||
var authStateEntries []types.StateEntry
|
||||
var err error
|
||||
if rewritesState {
|
||||
authStateEntries, err = db.StateEntriesForEventIDs(ctx, stateEventIDs)
|
||||
authStateEntries, err = db.StateEntriesForEventIDs(ctx, stateEventIDs, true)
|
||||
if err != nil {
|
||||
return true, fmt.Errorf("StateEntriesForEventIDs failed: %w", err)
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ func CheckAuthEvents(
|
|||
authEventIDs []string,
|
||||
) ([]types.EventNID, error) {
|
||||
// Grab the numeric IDs for the supplied auth state events from the database.
|
||||
authStateEntries, err := db.StateEntriesForEventIDs(ctx, authEventIDs)
|
||||
authStateEntries, err := db.StateEntriesForEventIDs(ctx, authEventIDs, true)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("db.StateEntriesForEventIDs: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue