Skip to content

Commit dede508

Browse files
committed
Support sending invite reasons
Added as the final argument to `invite` in order to keep backwards compatibility. Signed-off-by: Robin Townsend <[email protected]>
1 parent fccf08e commit dede508

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/client.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3447,11 +3447,12 @@ MatrixClient.prototype.getRoomUpgradeHistory = function(roomId, verifyLinks=fals
34473447
* @param {string} roomId
34483448
* @param {string} userId
34493449
* @param {module:client.callback} callback Optional.
3450+
* @param {string} reason Optional.
34503451
* @return {Promise} Resolves: TODO
34513452
* @return {module:http-api.MatrixError} Rejects: with an error response.
34523453
*/
3453-
MatrixClient.prototype.invite = function(roomId, userId, callback) {
3454-
return _membershipChange(this, roomId, userId, "invite", undefined,
3454+
MatrixClient.prototype.invite = function(roomId, userId, callback, reason) {
3455+
return _membershipChange(this, roomId, userId, "invite", reason,
34553456
callback);
34563457
};
34573458

0 commit comments

Comments
 (0)