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
add method for new /aliases endpoint
This commit is contained in:
@@ -1119,6 +1119,19 @@ MatrixBaseApis.prototype.deleteAlias = function(alias, callback) {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} roomId
|
||||||
|
* @param {module:client.callback} callback Optional.
|
||||||
|
* @return {Promise} Resolves: an object with an `aliases` property, containing an array of local aliases
|
||||||
|
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||||
|
*/
|
||||||
|
MatrixBaseApis.prototype.getLocalAliases =
|
||||||
|
function(roomId, callback) {
|
||||||
|
const path = utils.encodeUri("/rooms/$roomId/aliases",
|
||||||
|
{$roomId: roomId});
|
||||||
|
return this._http.authedRequest(callback, "GET", path);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get room info for the given alias.
|
* Get room info for the given alias.
|
||||||
* @param {string} alias The room alias to resolve.
|
* @param {string} alias The room alias to resolve.
|
||||||
|
|||||||
Reference in New Issue
Block a user