1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Support sending invite reasons

Added as the final argument to `invite` in order to keep backwards
compatibility.

Signed-off-by: Robin Townsend <robin@robin.town>
This commit is contained in:
Robin Townsend
2021-02-26 16:46:18 -05:00
parent fccf08edcf
commit dede508e89

View File

@@ -3447,11 +3447,12 @@ MatrixClient.prototype.getRoomUpgradeHistory = function(roomId, verifyLinks=fals
* @param {string} roomId * @param {string} roomId
* @param {string} userId * @param {string} userId
* @param {module:client.callback} callback Optional. * @param {module:client.callback} callback Optional.
* @param {string} reason Optional.
* @return {Promise} Resolves: TODO * @return {Promise} Resolves: TODO
* @return {module:http-api.MatrixError} Rejects: with an error response. * @return {module:http-api.MatrixError} Rejects: with an error response.
*/ */
MatrixClient.prototype.invite = function(roomId, userId, callback) { MatrixClient.prototype.invite = function(roomId, userId, callback, reason) {
return _membershipChange(this, roomId, userId, "invite", undefined, return _membershipChange(this, roomId, userId, "invite", reason,
callback); callback);
}; };