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
Support sending additional options with acceptance (#570)
To be able to send things like `{visibility: { type: 'private ' }}`
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
committed by
Luke Barnard
parent
0143ac2a86
commit
7a59579dcd
@@ -616,15 +616,16 @@ MatrixBaseApis.prototype.removeRoomFromGroup = function(groupId, roomId) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} groupId
|
* @param {string} groupId
|
||||||
|
* @param {Object} opts Additional options to send alongside the acceptance.
|
||||||
* @return {module:client.Promise} Resolves: Empty object
|
* @return {module:client.Promise} Resolves: Empty object
|
||||||
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||||
*/
|
*/
|
||||||
MatrixBaseApis.prototype.acceptGroupInvite = function(groupId) {
|
MatrixBaseApis.prototype.acceptGroupInvite = function(groupId, opts = null) {
|
||||||
const path = utils.encodeUri(
|
const path = utils.encodeUri(
|
||||||
"/groups/$groupId/self/accept_invite",
|
"/groups/$groupId/self/accept_invite",
|
||||||
{$groupId: groupId},
|
{$groupId: groupId},
|
||||||
);
|
);
|
||||||
return this._http.authedRequest(undefined, "PUT", path, undefined, {});
|
return this._http.authedRequest(undefined, "PUT", path, undefined, opts || {});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user