You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-23 17:02:25 +03:00
Use the v2 (hashed) lookup for identity server queries
Fixes https://github.com/vector-im/riot-web/issues/10556 Implements [MSC2134](https://github.com/matrix-org/matrix-doc/pull/2134) with assistance from [MSC2140](https://github.com/matrix-org/matrix-doc/pull/2140) for auth. Note: this also changes all identity server requests to use JSON as a request body. URL encoded forms were allowed in v1 but deprecated in favour of JSON. v2 APIs do not allow URL encoded forms.
This commit is contained in:
@@ -412,7 +412,7 @@ module.exports.MatrixHttpApi.prototype = {
|
||||
if (method == 'GET') {
|
||||
opts.qs = params;
|
||||
} else if (typeof params === "object") {
|
||||
opts.form = params;
|
||||
opts.json = params;
|
||||
} else if (typeof params === "string") {
|
||||
// Assume the caller has serialised the body to JSON
|
||||
opts.body = params;
|
||||
|
||||
Reference in New Issue
Block a user