Skip to content

Commit

Permalink
Merge pull request #1010 from matrix-org/jryans/user-settings-toggle-…
Browse files Browse the repository at this point in the history
…3pid

Fix POST body for v2 IS requests
  • Loading branch information
jryans authored Aug 8, 2019
2 parents 64ddbd9 + 8c15125 commit e95a133
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/base-apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,8 @@ MatrixBaseApis.prototype.requestEmailToken = async function(
try {
const response = await this._http.idServerRequest(
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
if (callback) callback(null, response);
Expand Down Expand Up @@ -1824,7 +1825,8 @@ MatrixBaseApis.prototype.submitMsisdnToken = async function(
try {
return await this._http.idServerRequest(
undefined, "POST", "/validate/msisdn/submitToken",
params, httpApi.PREFIX_IDENTITY_V2, identityAccessToken,
JSON.stringify(params), httpApi.PREFIX_IDENTITY_V2,
identityAccessToken,
);
} catch (err) {
if (err.cors === "rejected" || err.httpStatus === 404) {
Expand Down

0 comments on commit e95a133

Please sign in to comment.