aboutsummaryrefslogtreecommitdiff
path: root/roomserver/internal/helpers/auth.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-08-18 17:06:13 +0100
committerGitHub <noreply@github.com>2022-08-18 17:06:13 +0100
commit6b48ce0d757279965a6deb77a1ca8d72c15d4bff (patch)
treefc1316eed735d2b3b6b11dbf5aa1e8b027398ad9 /roomserver/internal/helpers/auth.go
parent606cb6750639b1e680cbe1dd1b8026ac1536d642 (diff)
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.
Diffstat (limited to 'roomserver/internal/helpers/auth.go')
-rw-r--r--roomserver/internal/helpers/auth.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/roomserver/internal/helpers/auth.go b/roomserver/internal/helpers/auth.go
index 648c50cf..935a045d 100644
--- a/roomserver/internal/helpers/auth.go
+++ b/roomserver/internal/helpers/auth.go
@@ -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)
}