Reject instead of soft-fail, don't copy roominfo so much

This commit is contained in:
Neil Alexander 2022-01-07 10:50:19 +00:00
parent eff348bb69
commit af34b4abe3
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
9 changed files with 22 additions and 23 deletions

View file

@ -56,7 +56,7 @@ func CheckForSoftFail(
// Then get the state entries for the current state snapshot.
// We'll use this to check if the event is allowed right now.
roomState := state.NewStateResolution(db, *roomInfo)
roomState := state.NewStateResolution(db, roomInfo)
authStateEntries, err = roomState.LoadStateAtSnapshot(ctx, roomInfo.StateSnapshotNID)
if err != nil {
return true, fmt.Errorf("roomState.LoadStateAtSnapshot: %w", err)