From 885c70c31ca4df5fdd79ce362bcc10600ddd0d43 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 2 Feb 2022 16:40:59 +0000 Subject: [PATCH] Tweaks --- roomserver/internal/helpers/auth.go | 6 +++--- roomserver/internal/input/input_missing.go | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/roomserver/internal/helpers/auth.go b/roomserver/internal/helpers/auth.go index e4f072a2f..9af0bf591 100644 --- a/roomserver/internal/helpers/auth.go +++ b/roomserver/internal/helpers/auth.go @@ -24,7 +24,7 @@ import ( "github.com/matrix-org/gomatrixserverlib" ) -type checkForSoftFailStorage interface { +type checkForAuthAndSoftFailStorage interface { state.StateResolutionStorage StateEntriesForEventIDs(ctx context.Context, eventIDs []string) ([]types.StateEntry, error) RoomInfo(ctx context.Context, roomID string) (*types.RoomInfo, error) @@ -35,7 +35,7 @@ type checkForSoftFailStorage interface { // the soft-fail bool. func CheckForSoftFail( ctx context.Context, - db checkForSoftFailStorage, + db checkForAuthAndSoftFailStorage, event *gomatrixserverlib.HeaderedEvent, stateEventIDs []string, ) (bool, error) { @@ -97,7 +97,7 @@ func CheckForSoftFail( // Returns the numeric IDs for the auth events. func CheckAuthEvents( ctx context.Context, - db checkForSoftFailStorage, + db checkForAuthAndSoftFailStorage, event *gomatrixserverlib.HeaderedEvent, authEventIDs []string, ) ([]types.EventNID, error) { diff --git a/roomserver/internal/input/input_missing.go b/roomserver/internal/input/input_missing.go index 5cc4a2e90..4cd2b3de1 100644 --- a/roomserver/internal/input/input_missing.go +++ b/roomserver/internal/input/input_missing.go @@ -18,8 +18,7 @@ import ( ) type missingStateReq struct { - origin gomatrixserverlib.ServerName - //db storage.Database + origin gomatrixserverlib.ServerName db *shared.RoomUpdater inputer *Inputer queryer *query.Queryer