Skip to content

Commit 3234b3f

Browse files
committed
improve code with options for consistency
1 parent 3e87eab commit 3234b3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3694,15 +3694,15 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
36943694
* updateFlags - reviews/unflags flagged message
36953695
*
36963696
* @param {string[]} message_ids list of message IDs
3697-
* @param {string} user_id user ID is set to review all the flagged messages by the user
3697+
* @param {string} options Option object in case user ID is set to review all the flagged messages by the user
36983698
* @param {string} reviewed_by user ID who reviewed the flagged message
36993699
* @returns {APIResponse}
37003700
*/
3701-
async updateFlags(message_ids: string[], user_id: string, reviewed_by: string) {
3701+
async updateFlags(message_ids: string[], reviewed_by: string, options: { user_id?: string } = {}) {
37023702
return await this.post<APIResponse>(this.baseURL + '/automod/v1/moderation/update_flags', {
37033703
message_ids,
3704-
user_id,
37053704
reviewed_by,
3705+
...options
37063706
});
37073707
}
37083708
}

0 commit comments

Comments
 (0)