Merge branch 'master' into query-key-backup

This commit is contained in:
Neil Alexander 2021-11-02 16:38:00 +00:00 committed by GitHub
commit 60af5bee47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 488 additions and 441 deletions

View file

@ -77,9 +77,9 @@ func PostJSON(
return nil
}
if msgerr := json.NewDecoder(res.Body).Decode(&errorBody); msgerr == nil {
return fmt.Errorf("Internal API: %d from %s: %s", res.StatusCode, apiURL, errorBody.Message)
return fmt.Errorf("internal API: %d from %s: %s", res.StatusCode, apiURL, errorBody.Message)
}
return fmt.Errorf("Internal API: %d from %s", res.StatusCode, apiURL)
return fmt.Errorf("internal API: %d from %s", res.StatusCode, apiURL)
}
return json.NewDecoder(res.Body).Decode(response)
}

View file

@ -19,5 +19,6 @@ const (
PublicFederationPathPrefix = "/_matrix/federation/"
PublicKeyPathPrefix = "/_matrix/key/"
PublicMediaPathPrefix = "/_matrix/media/"
PublicWellKnownPrefix = "/.well-known/matrix/"
InternalPathPrefix = "/api/"
)