You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Tweak unbind 3PID params
This commit is contained in:
@@ -1411,14 +1411,19 @@ MatrixBaseApis.prototype.bindThreePid = function(data) {
|
|||||||
* homeserver removes its record of the binding to keep an updated record of
|
* homeserver removes its record of the binding to keep an updated record of
|
||||||
* where all 3PIDs for the account are bound.
|
* where all 3PIDs for the account are bound.
|
||||||
*
|
*
|
||||||
* @param {Object} data A object with 3PID validation data from having called
|
* @param {string} medium The threepid medium (eg. 'email')
|
||||||
* `validate/<medium>/requestToken` on the identity server. It should also
|
* @param {string} address The threepid address (eg. 'bob@example.com')
|
||||||
* contain `id_server` and `id_access_token` fields as well.
|
* this must be as returned by getThreePids.
|
||||||
* @return {module:client.Promise} Resolves: on success
|
* @return {module:client.Promise} Resolves: on success
|
||||||
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||||
*/
|
*/
|
||||||
MatrixBaseApis.prototype.unbindThreePid = function(data) {
|
MatrixBaseApis.prototype.unbindThreePid = function(medium, address) {
|
||||||
const path = "/account/3pid/unbind";
|
const path = "/account/3pid/unbind";
|
||||||
|
const data = {
|
||||||
|
medium,
|
||||||
|
address,
|
||||||
|
id_server: this.getIdentityServerUrl(true),
|
||||||
|
};
|
||||||
return this._http.authedRequest(
|
return this._http.authedRequest(
|
||||||
undefined, "POST", path, null, data, {
|
undefined, "POST", path, null, data, {
|
||||||
prefix: httpApi.PREFIX_UNSTABLE,
|
prefix: httpApi.PREFIX_UNSTABLE,
|
||||||
|
|||||||
Reference in New Issue
Block a user