You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
Add API for bulk lookup on the Identity Server
This adds support for querying `/bulk_lookup` on the IS to check several 3PIDs at the same time. Part of https://github.com/vector-im/riot-web/issues/10159
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