mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Linting
This commit is contained in:
parent
6a0cce29a6
commit
9df9a50a1a
1 changed files with 5 additions and 9 deletions
|
@ -86,15 +86,7 @@ func (a *AppServiceQueryAPI) RoomAliasExists(
|
||||||
req = req.WithContext(ctx)
|
req = req.WithContext(ctx)
|
||||||
resp, err := a.HTTPClient.Do(req)
|
resp, err := a.HTTPClient.Do(req)
|
||||||
if resp != nil {
|
if resp != nil {
|
||||||
defer func() {
|
defer resp.Body.Close() // nolint: errcheck
|
||||||
err = resp.Body.Close()
|
|
||||||
if err != nil {
|
|
||||||
log.WithFields(log.Fields{
|
|
||||||
"appservice_id": appservice.ID,
|
|
||||||
"status_code": resp.StatusCode,
|
|
||||||
}).WithError(err).Error("Unable to close application service response body")
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithError(err).Errorf("Issue querying room alias on application service %s", appservice.ID)
|
log.WithError(err).Errorf("Issue querying room alias on application service %s", appservice.ID)
|
||||||
|
@ -141,6 +133,10 @@ func (a *AppServiceQueryAPI) UserIDExists(
|
||||||
if appservice.URL != "" && appservice.IsInterestedInUserID(request.UserID) {
|
if appservice.URL != "" && appservice.IsInterestedInUserID(request.UserID) {
|
||||||
// The full path to the rooms API, includes hs token
|
// The full path to the rooms API, includes hs token
|
||||||
URL, err := url.Parse(appservice.URL + userIDExistsPath)
|
URL, err := url.Parse(appservice.URL + userIDExistsPath)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
URL.Path += request.UserID
|
URL.Path += request.UserID
|
||||||
apiURL := URL.String() + "?access_token=" + appservice.HSToken
|
apiURL := URL.String() + "?access_token=" + appservice.HSToken
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue