Skip to content

Commit

Permalink
Merge branch 'moderation-v2-poc' of github.com:GetStream/stream-chat-…
Browse files Browse the repository at this point in the history
…js into moderation-v2-poc
  • Loading branch information
vishalnarkhede committed Jun 25, 2024
2 parents f1c2a29 + cabd8f5 commit 2927d0b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [8.37.0](https://github.com/GetStream/stream-chat-js/compare/v8.36.0...v8.37.0) (2024-06-25)


### Features

* update flag endpoint ([#1323](https://github.com/GetStream/stream-chat-js/issues/1323)) ([1944b76](https://github.com/GetStream/stream-chat-js/commit/1944b7604da71ed556810148b11b55df1313c931))

## [8.36.0](https://github.com/GetStream/stream-chat-js/compare/v8.35.0...v8.36.0) (2024-06-10)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stream-chat",
"version": "8.36.0",
"version": "8.37.0",
"description": "JS SDK for the Stream Chat API",
"author": "GetStream",
"homepage": "https://getstream.io/chat/",
Expand Down
16 changes: 16 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3780,4 +3780,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 2927d0b

Please sign in to comment.