Fix response to federation /invite to match the format expected by synapse (#221)

* Fix response to /invite to match the format expected by synapse

* gb vendor update github.com/matrix-org/gomatrixserverlib

* Use gomatrixserverlib.RespInvite

* gb vendor update github.com/matrix-org/gomatrixserverlib
This commit is contained in:
Mark Haines 2017-09-11 18:07:12 +01:00 committed by GitHub
parent 5740cb3e58
commit 6cb9d900b9
21 changed files with 148 additions and 64 deletions

View file

@ -114,7 +114,7 @@ func (fc *Client) LookupUserInfo(matrixServer ServerName, token string) (u UserI
var response *http.Response
response, err = fc.client.Get(url.String())
if response != nil {
defer response.Body.Close()
defer response.Body.Close() // nolint: errcheck
}
if err != nil {
return
@ -152,7 +152,7 @@ func (fc *Client) LookupUserInfo(matrixServer ServerName, token string) (u UserI
// return a cached copy of the keys or whether they will need to retrieve a fresh
// copy of the keys.
// Returns the keys or an error if there was a problem talking to the server.
func (fc *Client) LookupServerKeys(
func (fc *Client) LookupServerKeys( // nolint: gocyclo
matrixServer ServerName, keyRequests map[PublicKeyRequest]Timestamp,
) (map[PublicKeyRequest]ServerKeys, error) {
url := url.URL{
@ -185,7 +185,7 @@ func (fc *Client) LookupServerKeys(
response, err := fc.client.Post(url.String(), "application/json", bytes.NewBuffer(requestBytes))
if response != nil {
defer response.Body.Close()
defer response.Body.Close() // nolint: errcheck
}
if err != nil {
return nil, err