Skip to content

Commit

Permalink
Add error checks
Browse files Browse the repository at this point in the history
Signed-off-by: Till Faelligen <[email protected]>
  • Loading branch information
S7evinK committed Aug 10, 2021
1 parent 04823e8 commit 47fbf69
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions appservice/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ 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

Expand Down Expand Up @@ -114,6 +117,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

Expand Down

0 comments on commit 47fbf69

Please sign in to comment.