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
Merge pull request #1009 from matrix-org/jryans/user-settings-toggle-3pid
Add API for bulk lookup on the Identity Server
This commit is contained in:
@@ -396,16 +396,19 @@ module.exports.MatrixHttpApi.prototype = {
|
||||
withCredentials: false,
|
||||
json: false,
|
||||
_matrix_opts: this.opts,
|
||||
headers: {},
|
||||
};
|
||||
if (method == 'GET') {
|
||||
opts.qs = params;
|
||||
} else {
|
||||
} else if (typeof params === "object") {
|
||||
opts.form = params;
|
||||
} else if (typeof params === "string") {
|
||||
// Assume the caller has serialised the body to JSON
|
||||
opts.body = params;
|
||||
opts.headers['Content-Type'] = "application/json";
|
||||
}
|
||||
if (accessToken) {
|
||||
opts.headers = {
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
};
|
||||
opts.headers['Authorization'] = `Bearer ${accessToken}`;
|
||||
}
|
||||
|
||||
const defer = Promise.defer();
|
||||
|
||||
Reference in New Issue
Block a user