From 495c50531d195e544608b5e5555e1fd53d1508f0 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 15 Dec 2024 10:15:26 +0000 Subject: [PATCH] Linter --- roomserver/internal/input/input_events.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roomserver/internal/input/input_events.go b/roomserver/internal/input/input_events.go index 969f42c6..e1081afb 100644 --- a/roomserver/internal/input/input_events.go +++ b/roomserver/internal/input/input_events.go @@ -584,7 +584,8 @@ func (r *Inputer) processStateBefore( case input.HasState: // If we're overriding the state then we need to go and retrieve // them from the database. It's a hard error if they are missing. - stateEvents, err := r.DB.EventsFromIDs(ctx, roomInfo, input.StateEventIDs) + var stateEvents []types.Event + stateEvents, err = r.DB.EventsFromIDs(ctx, roomInfo, input.StateEventIDs) if err != nil { return "", nil, fmt.Errorf("r.DB.EventsFromIDs: %w", err) } @@ -620,7 +621,7 @@ func (r *Inputer) processStateBefore( StateToFetch: tuplesNeeded, } stateBeforeRes := &api.QueryStateAfterEventsResponse{} - if err := r.Queryer.QueryStateAfterEvents(ctx, stateBeforeReq, stateBeforeRes); err != nil { + if err = r.Queryer.QueryStateAfterEvents(ctx, stateBeforeReq, stateBeforeRes); err != nil { return "", nil, fmt.Errorf("r.Queryer.QueryStateAfterEvents: %w", err) } switch {