Skip to content

Commit

Permalink
feat: update flag endpoint (#1323)
Browse files Browse the repository at this point in the history
API endpoint to mark flagged message as reviewed
  • Loading branch information
viktorapo808 committed Jun 25, 2024
1 parent c58feeb commit 1944b76
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3689,4 +3689,20 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
...options,
});
}

/**
* updateFlags - reviews/unflags flagged message
*
* @param {string[]} message_ids list of message IDs
* @param {string} options Option object in case user ID is set to review all the flagged messages by the user
* @param {string} reviewed_by user ID who reviewed the flagged message
* @returns {APIResponse}
*/
async updateFlags(message_ids: string[], reviewed_by: string, options: { user_id?: string } = {}) {
return await this.post<APIResponse>(this.baseURL + '/automod/v1/moderation/update_flags', {
message_ids,
reviewed_by,
...options,
});
}
}

0 comments on commit 1944b76

Please sign in to comment.