aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorS7evinK <tfaelligen@gmail.com>2021-12-03 18:18:35 +0100
committerGitHub <noreply@github.com>2021-12-03 17:18:35 +0000
commit08a0278760b6d64ccacdb9ab47cd468f80243c57 (patch)
tree1ba1dc2606f38892a7c995484bbea85560a094e4 /internal
parentf9bac2f78aaed91a77cc1fe455a05899be2e2a12 (diff)
Add missing HTTP mode for userapi (#1982)
* Add missing internal api endpoint Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add missing performKeyBackup endpoint * Add missing http mode for userapi * Fix failing tests * Add error checks * Fix sytest * Update startup logic for HTTP mode * Use userImpl for AS (annoying) * Don't send device list updates for appservice devices * Fix build Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Diffstat (limited to 'internal')
-rw-r--r--internal/httputil/http.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/httputil/http.go b/internal/httputil/http.go
index a469c8ac..4527e2b9 100644
--- a/internal/httputil/http.go
+++ b/internal/httputil/http.go
@@ -23,6 +23,7 @@ import (
"net/url"
"strings"
+ "github.com/matrix-org/dendrite/userapi/api"
opentracing "github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext"
)
@@ -72,6 +73,9 @@ func PostJSON(
var errorBody struct {
Message string `json:"message"`
}
+ if _, ok := response.(*api.PerformKeyBackupResponse); ok { // TODO: remove this, once cross-boundary errors are a thing
+ 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)
}