From 661cc27be7b18df1b383a592d8b196374e132d92 Mon Sep 17 00:00:00 2001 From: Devon Mizelle Date: Fri, 13 Aug 2021 17:45:56 -0400 Subject: [PATCH] Fix ineffectual error assignment Was working on another PR and noticed that golangci-lint was failing locally on `ineffassign` Signed-off-by: Devon Mizelle --- appservice/query/query.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/appservice/query/query.go b/appservice/query/query.go index 9f6c79a80..dacd3caa8 100644 --- a/appservice/query/query.go +++ b/appservice/query/query.go @@ -51,6 +51,10 @@ func (a *AppServiceQueryAPI) RoomAliasExists( if appservice.URL != "" && appservice.IsInterestedInRoomAlias(request.Alias) { // The full path to the rooms API, includes hs token URL, err := url.Parse(appservice.URL + roomAliasExistsPath) + if err != nil { + return err + } + URL.Path += request.Alias apiURL := URL.String() + "?access_token=" + appservice.HSToken @@ -114,6 +118,9 @@ func (a *AppServiceQueryAPI) UserIDExists( if appservice.URL != "" && appservice.IsInterestedInUserID(request.UserID) { // The full path to the rooms API, includes hs token URL, err := url.Parse(appservice.URL + userIDExistsPath) + if err != nil { + return err + } URL.Path += request.UserID apiURL := URL.String() + "?access_token=" + appservice.HSToken