aboutsummaryrefslogtreecommitdiff
path: root/setup/mscs
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 /setup/mscs
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 'setup/mscs')
-rw-r--r--setup/mscs/msc2836/msc2836_test.go3
-rw-r--r--setup/mscs/msc2946/msc2946_test.go3
2 files changed, 2 insertions, 4 deletions
diff --git a/setup/mscs/msc2836/msc2836_test.go b/setup/mscs/msc2836/msc2836_test.go
index 18ab08be..9044823a 100644
--- a/setup/mscs/msc2836/msc2836_test.go
+++ b/setup/mscs/msc2836/msc2836_test.go
@@ -7,7 +7,6 @@ import (
"crypto/sha256"
"encoding/base64"
"encoding/json"
- "fmt"
"io/ioutil"
"net/http"
"sort"
@@ -504,7 +503,7 @@ type testUserAPI struct {
func (u *testUserAPI) QueryAccessToken(ctx context.Context, req *userapi.QueryAccessTokenRequest, res *userapi.QueryAccessTokenResponse) error {
dev, ok := u.accessTokens[req.AccessToken]
if !ok {
- res.Err = fmt.Errorf("unknown token")
+ res.Err = "unknown token"
return nil
}
res.Device = &dev
diff --git a/setup/mscs/msc2946/msc2946_test.go b/setup/mscs/msc2946/msc2946_test.go
index 441892f3..e8066c34 100644
--- a/setup/mscs/msc2946/msc2946_test.go
+++ b/setup/mscs/msc2946/msc2946_test.go
@@ -19,7 +19,6 @@ import (
"context"
"crypto/ed25519"
"encoding/json"
- "fmt"
"io/ioutil"
"net/http"
"net/url"
@@ -347,7 +346,7 @@ type testUserAPI struct {
func (u *testUserAPI) QueryAccessToken(ctx context.Context, req *userapi.QueryAccessTokenRequest, res *userapi.QueryAccessTokenResponse) error {
dev, ok := u.accessTokens[req.AccessToken]
if !ok {
- res.Err = fmt.Errorf("unknown token")
+ res.Err = "unknown token"
return nil
}
res.Device = &dev