aboutsummaryrefslogtreecommitdiff
path: root/appservice
diff options
context:
space:
mode:
authorDevon Mizelle <dev@devon.so>2021-08-16 09:19:35 -0400
committerGitHub <noreply@github.com>2021-08-16 14:19:35 +0100
commitc2b9ab7470627d49c986472cb9131ea2f33e3366 (patch)
treecefd62deeda4dbc81d3c9cb6f371cdcde827a501 /appservice
parent125ea75b2419aa5ebf58506e3fbd03a90eb06d68 (diff)
Fix ineffectual error assignment (#1976)
Was working on another PR and noticed that golangci-lint was failing locally on `ineffassign` Signed-off-by: Devon Mizelle <dev@devon.so>
Diffstat (limited to 'appservice')
-rw-r--r--appservice/query/query.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/appservice/query/query.go b/appservice/query/query.go
index 9f6c79a8..dacd3caa 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