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
Merge pull request #1010 from matrix-org/jryans/user-settings-toggle-3pid
Fix POST body for v2 IS requests
This commit is contained in:
@@ -1769,7 +1769,8 @@ MatrixBaseApis.prototype.requestEmailToken = async function(
|
|||||||
try {
|
try {
|
||||||
const response = await this._http.idServerRequest(
|
const response = await this._http.idServerRequest(
|
||||||
undefined, "POST", "/validate/email/requestToken",
|
undefined, "POST", "/validate/email/requestToken",
|
||||||
params, httpApi.PREFIX_IDENTITY_V2, identityAccessToken,
|
JSON.stringify(params), httpApi.PREFIX_IDENTITY_V2,
|
||||||
|
identityAccessToken,
|
||||||
);
|
);
|
||||||
// TODO: Fold callback into above call once v1 path below is removed
|
// TODO: Fold callback into above call once v1 path below is removed
|
||||||
if (callback) callback(null, response);
|
if (callback) callback(null, response);
|
||||||
@@ -1824,7 +1825,8 @@ MatrixBaseApis.prototype.submitMsisdnToken = async function(
|
|||||||
try {
|
try {
|
||||||
return await this._http.idServerRequest(
|
return await this._http.idServerRequest(
|
||||||
undefined, "POST", "/validate/msisdn/submitToken",
|
undefined, "POST", "/validate/msisdn/submitToken",
|
||||||
params, httpApi.PREFIX_IDENTITY_V2, identityAccessToken,
|
JSON.stringify(params), httpApi.PREFIX_IDENTITY_V2,
|
||||||
|
identityAccessToken,
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.cors === "rejected" || err.httpStatus === 404) {
|
if (err.cors === "rejected" || err.httpStatus === 404) {
|
||||||
|
|||||||
Reference in New Issue
Block a user