You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-19 10:22:30 +03:00
Add API to delete threepid
Uses https://github.com/matrix-org/synapse/pull/1714
This commit is contained in:
@@ -712,6 +712,24 @@ MatrixBaseApis.prototype.addThreePid = function(creds, bind, callback) {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} medium The threepid medium (eg. 'email')
|
||||||
|
* @param {string} address The threepid address (eg. 'bob@example.com')
|
||||||
|
* @return {module:client.Promise} Resolves: The server response on success
|
||||||
|
* (generally the empty JSON object)
|
||||||
|
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||||
|
*/
|
||||||
|
MatrixBaseApis.prototype.deleteThreePid = function(medium, address) {
|
||||||
|
var path = "/account/3pid/delete";
|
||||||
|
var data = {
|
||||||
|
'medium': medium,
|
||||||
|
'address': address
|
||||||
|
};
|
||||||
|
return this._http.authedRequestWithPrefix(
|
||||||
|
undefined, "POST", path, null, data, httpApi.PREFIX_UNSTABLE
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a request to change your password.
|
* Make a request to change your password.
|
||||||
* @param {Object} authDict
|
* @param {Object} authDict
|
||||||
|
|||||||
Reference in New Issue
Block a user