Skip to content

Commit 1944b76

Browse files
authored
feat: update flag endpoint (#1323)
API endpoint to mark flagged message as reviewed
1 parent c58feeb commit 1944b76

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/client.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3689,4 +3689,20 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
36893689
...options,
36903690
});
36913691
}
3692+
3693+
/**
3694+
* updateFlags - reviews/unflags flagged message
3695+
*
3696+
* @param {string[]} message_ids list of message IDs
3697+
* @param {string} options Option object in case user ID is set to review all the flagged messages by the user
3698+
* @param {string} reviewed_by user ID who reviewed the flagged message
3699+
* @returns {APIResponse}
3700+
*/
3701+
async updateFlags(message_ids: string[], reviewed_by: string, options: { user_id?: string } = {}) {
3702+
return await this.post<APIResponse>(this.baseURL + '/automod/v1/moderation/update_flags', {
3703+
message_ids,
3704+
reviewed_by,
3705+
...options,
3706+
});
3707+
}
36923708
}

0 commit comments

Comments
 (0)