Skip to content

Commit

Permalink
feat: muteUserV2 endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnarkhede committed Jun 27, 2024
1 parent 2927d0b commit b7db1b1
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1640,6 +1640,30 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
});
}

async muteUserV2(
targetID: string,
options: {
timeout?: number,
user_id?: string,
} = {},
) {
return await this.post<MuteUserResponse & APIResponse>(this.baseURL + '/api/v2/moderation/mute', {
target_ids: [targetID],
...options,
});
}

async unmuteUserV2(
targetID: string,
options: {
user_id?: string,
},
) {
return await this.post<{ item_id: string } & APIResponse>(this.baseURL + '/api/v2/moderation/unmute', {
target_ids: [targetID],
...options,
});
}
/**
* queryChannels - Query channels
*
Expand Down

0 comments on commit b7db1b1

Please sign in to comment.