diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-06-17 17:41:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 17:41:45 +0100 |
commit | ddf1c8adf1fd1441b76834df479d1ab5a132de88 (patch) | |
tree | 9a738062cade5fcd16fc2f4cc60e8b4a7efe18cc /keyserver | |
parent | 84a7881468a57bd4225f5c990c03b5fce729f914 (diff) |
Hacks for supporting Riot iOS (#1148)
* Join room body is optional
* Support deprecated login by user/password
* Implement dummy key upload endpoint
* Make a very determinate end to /messages if we hit the create event in back-pagination
* Linting
Diffstat (limited to 'keyserver')
-rw-r--r-- | keyserver/routing/routing.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/keyserver/routing/routing.go b/keyserver/routing/routing.go index c09031d8..dba43528 100644 --- a/keyserver/routing/routing.go +++ b/keyserver/routing/routing.go @@ -36,9 +36,19 @@ func Setup( publicAPIMux *mux.Router, cfg *config.Dendrite, userAPI userapi.UserInternalAPI, ) { r0mux := publicAPIMux.PathPrefix(pathPrefixR0).Subrouter() + r0mux.Handle("/keys/query", httputil.MakeAuthAPI("queryKeys", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse { return QueryKeys(req) }), ).Methods(http.MethodPost, http.MethodOptions) + + r0mux.Handle("/keys/upload/{keyID}", + httputil.MakeAuthAPI("keys_upload", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse { + return util.JSONResponse{ + Code: 200, + JSON: map[string]interface{}{}, + } + }), + ).Methods(http.MethodPost, http.MethodOptions) } |