Skip to content

Commit 618f9ff

Browse files
committed
feat: enable moderation v2 on the sdk and sample apps
1 parent cd6ba01 commit 618f9ff

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"path": "0.12.7",
7979
"react-native-markdown-package": "1.8.2",
8080
"react-native-url-polyfill": "^1.3.0",
81-
"stream-chat": "8.44.0"
81+
"stream-chat": "8.45.1"
8282
},
8383
"peerDependencies": {
8484
"react-native-quick-sqlite": ">=5.1.0",

package/src/utils/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ export const isBouncedMessage = <
9494
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
9595
>(
9696
message: MessageType<StreamChatGenerics>,
97-
) => message.type === 'error' && message.moderation_details !== undefined;
97+
) =>
98+
(message.type === 'error' &&
99+
message?.moderation_details?.action === 'MESSAGE_RESPONSE_ACTION_BOUNCE') ||
100+
message?.moderation?.action === 'bounce';
98101

99102
/**
100103
* Utility to check if the message is a edited message.

0 commit comments

Comments
 (0)