Skip to content

Commit

Permalink
feat(lib): add missing 'rason' parameter to User.setRestrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-suwala committed Dec 15, 2023
1 parent e478ff0 commit 0f4d40c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/entities/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ export class User {
* Moderation restrictions
*/

async setRestrictions(channel: Channel, params: { ban?: boolean; mute?: boolean }) {
async setRestrictions(
channel: Channel,
params: { ban?: boolean; mute?: boolean; reason?: string }
) {
if (!(this.chat.sdk as any)._config.secretKey)
throw "Moderation restrictions can only be set by clients initialized with a Secret Key."
return this.chat.setRestrictions(this.id, channel.id, params)
Expand Down

0 comments on commit 0f4d40c

Please sign in to comment.