From b40d89fc1f64052baf0e3567c761486c62c12791 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 6 Jan 2022 16:30:22 +0000 Subject: [PATCH] Linting --- roomserver/api/query.go | 2 +- roomserver/internal/query/query.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roomserver/api/query.go b/roomserver/api/query.go index 00ddd3318..283217157 100644 --- a/roomserver/api/query.go +++ b/roomserver/api/query.go @@ -226,7 +226,7 @@ type QueryStateAndAuthChainRequest struct { PrevEventIDs []string `json:"prev_event_ids"` // The list of auth events for the event. Used to calculate the auth chain AuthEventIDs []string `json:"auth_event_ids"` - // If true, the auth chain events for the authh event IDs given will be fetched only. Prev event IDs are ignored. + // If true, the auth chain events for the auth event IDs given will be fetched only. Prev event IDs are ignored. // If false, state and auth chain events for the prev event IDs and entire current state will be included. // TODO: not a great API shape. It serves 2 main uses: false=>response for send_join, true=>response for /event_auth OnlyFetchAuthChain bool `json:"only_fetch_auth_chain"` diff --git a/roomserver/internal/query/query.go b/roomserver/internal/query/query.go index 3f297b1d0..28b140c76 100644 --- a/roomserver/internal/query/query.go +++ b/roomserver/internal/query/query.go @@ -461,7 +461,8 @@ func (r *Queryer) QueryStateAndAuthChain( // the entire current state of the room // TODO: this probably means it should be a different query operation... if request.OnlyFetchAuthChain { - authEvents, err := GetAuthChain(ctx, r.DB.EventsFromIDs, request.AuthEventIDs) + var authEvents []*gomatrixserverlib.Event + authEvents, err = GetAuthChain(ctx, r.DB.EventsFromIDs, request.AuthEventIDs) if err != nil { return err }