You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
deleteAlias() support
This commit is contained in:
@@ -1458,6 +1458,22 @@ MatrixClient.prototype.createAlias = function(alias, roomId, callback) {
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete an alias to room ID mapping. This alias must be on your local server (I hope).
|
||||
* @param {string} alias The room alias to delete.
|
||||
* @param {module:client.callback} callback Optional.
|
||||
* @return {module:client.Promise} Resolves: TODO.
|
||||
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||
*/
|
||||
MatrixClient.prototype.deleteAlias = function(alias, roomId, callback) {
|
||||
var path = utils.encodeUri("/directory/room/$alias", {
|
||||
$alias: alias
|
||||
});
|
||||
return this._http.authedRequest(
|
||||
callback, "DELETE", path, undefined, undefined
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get room info for the given alias.
|
||||
* @param {string} alias The room alias to resolve.
|
||||
|
||||
Reference in New Issue
Block a user