You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
Fix thinko where idServerRequests return strings
This commit is contained in:
@@ -2850,7 +2850,12 @@ MatrixClient.prototype.requestEmailToken = function(email, clientSecret,
|
||||
return this._http.idServerRequest(
|
||||
callback, "POST", "/validate/email/requestToken",
|
||||
params, httpApi.PREFIX_IDENTITY_V1
|
||||
);
|
||||
).then(function(res) {
|
||||
if (typeof res === "string") {
|
||||
return JSON.parse(res);
|
||||
}
|
||||
return res;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user