diff --git a/src/base-apis.js b/src/base-apis.js index 69e1d5d92..deea49213 100644 --- a/src/base-apis.js +++ b/src/base-apis.js @@ -503,6 +503,20 @@ MatrixBaseApis.prototype.addUserToGroupSummary = function(groupId, userId, roleI return this._http.authedRequest(undefined, "PUT", path, undefined, {}); }; +/** + * @param {string} groupId + * @param {string} userId + * @return {module:client.Promise} Resolves: Empty object + * @return {module:http-api.MatrixError} Rejects: with an error response. + */ +MatrixBaseApis.prototype.removeUserFromGroupSummary = function(groupId, userId) { + const path = utils.encodeUri( + "/groups/$groupId/summary/users/$userId", + {$groupId: groupId, $userId: userId}, + ); + return this._http.authedRequest(undefined, "DELETE", path, undefined, {}); +}; + /** * @param {string} groupId * @param {string} roomId @@ -520,6 +534,20 @@ MatrixBaseApis.prototype.addRoomToGroupSummary = function(groupId, roomId, categ 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.removeRoomFromGroupSummary = function(groupId, roomId) { + const path = utils.encodeUri( + "/groups/$groupId/summary/rooms/$roomId", + {$groupId: groupId, $roomId: roomId}, + ); + return this._http.authedRequest(undefined, "DELETE", path, undefined, {}); +}; + /** * @param {string} groupId * @return {module:client.Promise} Resolves: Empty object