diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-02-23 15:41:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 15:41:32 +0000 |
commit | fea8d152e7d81a9cbd387108d263950d8ec6ddc7 (patch) | |
tree | dce949a63a636944d17363ee366880fc184bfd5a /roomserver/internal/helpers | |
parent | b8a97b6ee083d1047d09f99daf2594d0821705ca (diff) |
Relax roomserver input transactional isolation (#2224)
* Don't force full transactional isolation on roomserver input
* Set succeeded
* Tweak `MissingAuthPrevEvents`
Diffstat (limited to 'roomserver/internal/helpers')
-rw-r--r-- | roomserver/internal/helpers/auth.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/roomserver/internal/helpers/auth.go b/roomserver/internal/helpers/auth.go index 9af0bf59..0229f822 100644 --- a/roomserver/internal/helpers/auth.go +++ b/roomserver/internal/helpers/auth.go @@ -20,22 +20,17 @@ import ( "sort" "github.com/matrix-org/dendrite/roomserver/state" + "github.com/matrix-org/dendrite/roomserver/storage" "github.com/matrix-org/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" ) -type checkForAuthAndSoftFailStorage interface { - state.StateResolutionStorage - StateEntriesForEventIDs(ctx context.Context, eventIDs []string) ([]types.StateEntry, error) - RoomInfo(ctx context.Context, roomID string) (*types.RoomInfo, error) -} - // CheckForSoftFail returns true if the event should be soft-failed // and false otherwise. The return error value should be checked before // the soft-fail bool. func CheckForSoftFail( ctx context.Context, - db checkForAuthAndSoftFailStorage, + db storage.Database, event *gomatrixserverlib.HeaderedEvent, stateEventIDs []string, ) (bool, error) { @@ -97,7 +92,7 @@ func CheckForSoftFail( // Returns the numeric IDs for the auth events. func CheckAuthEvents( ctx context.Context, - db checkForAuthAndSoftFailStorage, + db storage.Database, event *gomatrixserverlib.HeaderedEvent, authEventIDs []string, ) ([]types.EventNID, error) { |