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
Implement wrapper API for removing a room from a group
This commit is contained in:
@@ -562,6 +562,20 @@ MatrixBaseApis.prototype.addRoomToGroup = function(groupId, roomId) {
|
|||||||
return this._http.authedRequest(undefined, "PUT", path, undefined, {});
|
return this._http.authedRequest(undefined, "PUT", path, undefined, {});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} groupId
|
||||||
|
* @param {string} roomId
|
||||||
|
* @return {module:client.Promise} Resolves: Empty object
|
||||||
|
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||||
|
*/
|
||||||
|
MatrixBaseApis.prototype.removeRoomFromGroup = function(groupId, roomId) {
|
||||||
|
const path = utils.encodeUri(
|
||||||
|
"/groups/$groupId/admin/rooms/$roomId",
|
||||||
|
{$groupId: groupId, $roomId: roomId},
|
||||||
|
);
|
||||||
|
return this._http.authedRequest(undefined, "DELETE", path, undefined, {});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} groupId
|
* @param {string} groupId
|
||||||
* @return {module:client.Promise} Resolves: Empty object
|
* @return {module:client.Promise} Resolves: Empty object
|
||||||
|
|||||||
Reference in New Issue
Block a user