Skip to content

Commit

Permalink
fix(lib): fix typo in setRestrictions method name
Browse files Browse the repository at this point in the history
  • Loading branch information
Salet committed Nov 8, 2023
1 parent dcb2a43 commit 654444e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/src/entities/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -681,10 +681,10 @@ export class Channel {
* Moderation restrictions
*/

async setResctrictions(user: User, params: { ban?: boolean; mute?: boolean }) {
async setRestrictions(user: User, params: { ban?: boolean; mute?: boolean }) {
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.setResctrictions(user.id, this.id, params)
return this.chat.setRestrictions(user.id, this.id, params)
}

/* @internal */
Expand Down
2 changes: 1 addition & 1 deletion lib/src/entities/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ export class Chat {
* Moderation restrictions
*/

async setResctrictions(
async setRestrictions(
userId: string,
channelId: string,
params: { ban?: boolean; mute?: boolean }
Expand Down
4 changes: 2 additions & 2 deletions lib/src/entities/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ export class User {
* Moderation restrictions
*/

async setResctrictions(channel: Channel, params: { ban?: boolean; mute?: boolean }) {
async setRestrictions(channel: Channel, params: { ban?: boolean; mute?: boolean }) {
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.setResctrictions(this.id, channel.id, params)
return this.chat.setRestrictions(this.id, channel.id, params)
}

/* @internal */
Expand Down

0 comments on commit 654444e

Please sign in to comment.