1
0
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:
David Baker
2016-12-21 18:48:42 +00:00
parent 456135a6ec
commit 582576b1c3

View File

@@ -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.
* @param {Object} authDict