Skip to content

Commit

Permalink
Add API to delete threepid
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed Dec 21, 2016
1 parent 456135a commit 582576b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/base-apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 582576b

Please sign in to comment.