Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lib): fix typo in setRestrictions method name #152

Merged
merged 3 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading