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

feat: add support for the update flag endpoint #1323

Merged
merged 6 commits into from
Jun 25, 2024
Merged
Changes from all commits
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
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,
});
}
}
Loading