From 618f9ff461b70e0044ebebc4c6d1bb7381409133 Mon Sep 17 00:00:00 2001 From: Ivan Sekovanikj Date: Tue, 19 Nov 2024 17:36:16 +0100 Subject: [PATCH 1/2] feat: enable moderation v2 on the sdk and sample apps --- package/package.json | 2 +- package/src/utils/utils.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package/package.json b/package/package.json index fe6784e830..93447ffc98 100644 --- a/package/package.json +++ b/package/package.json @@ -78,7 +78,7 @@ "path": "0.12.7", "react-native-markdown-package": "1.8.2", "react-native-url-polyfill": "^1.3.0", - "stream-chat": "8.44.0" + "stream-chat": "8.45.1" }, "peerDependencies": { "react-native-quick-sqlite": ">=5.1.0", diff --git a/package/src/utils/utils.ts b/package/src/utils/utils.ts index 3cffd7600a..009ba25852 100644 --- a/package/src/utils/utils.ts +++ b/package/src/utils/utils.ts @@ -94,7 +94,10 @@ export const isBouncedMessage = < StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, >( message: MessageType, -) => message.type === 'error' && message.moderation_details !== undefined; +) => + (message.type === 'error' && + message?.moderation_details?.action === 'MESSAGE_RESPONSE_ACTION_BOUNCE') || + message?.moderation?.action === 'bounce'; /** * Utility to check if the message is a edited message. From 1522cfa34a1e3675f41609dd1e8d0d1a24be957c Mon Sep 17 00:00:00 2001 From: Ivan Sekovanikj Date: Wed, 20 Nov 2024 13:43:19 +0100 Subject: [PATCH 2/2] chore: update yarn.lock files as well --- examples/ExpoMessaging/yarn.lock | 33 +++++++++++++++++++------- examples/SampleApp/yarn.lock | 33 +++++++++++++++++++------- examples/TypeScriptMessaging/yarn.lock | 33 +++++++++++++++++++------- package/expo-package/yarn.lock | 8 +++---- package/native-package/yarn.lock | 8 +++---- package/yarn.lock | 8 +++---- 6 files changed, 84 insertions(+), 39 deletions(-) diff --git a/examples/ExpoMessaging/yarn.lock b/examples/ExpoMessaging/yarn.lock index 0ae2aa17fd..1b81592ba0 100644 --- a/examples/ExpoMessaging/yarn.lock +++ b/examples/ExpoMessaging/yarn.lock @@ -7310,10 +7310,10 @@ stream-buffers@2.2.x, stream-buffers@~2.2.0: version "0.0.0" uid "" -stream-chat-react-native-core@5.41.0: - version "5.41.0" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.41.0.tgz#defaeee932459c6357147c553167adee8d34493d" - integrity sha512-x46BYWWfRaRw3FbLLzCoJP636jHQrX+my9DG680t9p8wNWKX59imnqX9LjZVcOYo45vpJ8T5Zjs0kYXbDgppTQ== +stream-chat-react-native-core@5.42.2: + version "5.42.2" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.42.2.tgz#edb92b490d4beb894ba549c7deefc770f501360c" + integrity sha512-eA2fK3eYdhr2RSbB22s1ha29y4EPbj9yPAskWxGo1aJK+KXwXDlAYqGtJa/8saRSSU4DdV89yG5ihvTFgP+Huw== dependencies: "@gorhom/bottom-sheet" "^4.6.4" dayjs "1.10.5" @@ -7326,16 +7326,31 @@ stream-chat-react-native-core@5.41.0: path "0.12.7" react-native-markdown-package "1.8.2" react-native-url-polyfill "^1.3.0" - stream-chat "8.42.0" + stream-chat "8.44.0" "stream-chat-react-native-core@link:../../package": version "0.0.0" uid "" -stream-chat@8.42.0: - version "8.42.0" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.42.0.tgz#124ea2c10c6e8f7990304e1101c66751daf63e6c" - integrity sha512-8xZz+fmdHSOa3L1rHUOC4Wah+ipvLvdiOmeOfGK6uXnLOKlSHMOblwmQErrOoFM4SKfX9Bea3V8viaKUu6bPng== +stream-chat@8.44.0: + version "8.44.0" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.44.0.tgz#e48446cf91db786e80a2e7358ac4f1601e5e97f0" + integrity sha512-7HNtimD8sT/51rsFibGcD6uBgKj+vlKyYCZMDzjYQEaEsrLqyAg48dOyNM4L2FTF5aXgo9SlxZr21SPleeA2BA== + dependencies: + "@babel/runtime" "^7.16.3" + "@types/jsonwebtoken" "~9.0.0" + "@types/ws" "^7.4.0" + axios "^1.6.0" + base64-js "^1.5.1" + form-data "^4.0.0" + isomorphic-ws "^4.0.1" + jsonwebtoken "~9.0.0" + ws "^7.5.10" + +stream-chat@8.45.1: + version "8.45.1" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.45.1.tgz#001f452520602ebffe45f1634b5f5dd1ff036ec5" + integrity sha512-7OMpL2RHUd+PXSWzhTUAIjjXlI9Oqc4HhUBRfc5i6dK+Ug9S5ertb7RvyzGL5N4ITpq/6ZUAwXtTqRaN9+UUkw== dependencies: "@babel/runtime" "^7.16.3" "@types/jsonwebtoken" "~9.0.0" diff --git a/examples/SampleApp/yarn.lock b/examples/SampleApp/yarn.lock index 5bb870ebe7..fe345d8a88 100644 --- a/examples/SampleApp/yarn.lock +++ b/examples/SampleApp/yarn.lock @@ -6837,10 +6837,10 @@ statuses@~1.5.0: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== -stream-chat-react-native-core@5.41.0: - version "5.41.0" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.41.0.tgz#defaeee932459c6357147c553167adee8d34493d" - integrity sha512-x46BYWWfRaRw3FbLLzCoJP636jHQrX+my9DG680t9p8wNWKX59imnqX9LjZVcOYo45vpJ8T5Zjs0kYXbDgppTQ== +stream-chat-react-native-core@5.42.2: + version "5.42.2" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.42.2.tgz#edb92b490d4beb894ba549c7deefc770f501360c" + integrity sha512-eA2fK3eYdhr2RSbB22s1ha29y4EPbj9yPAskWxGo1aJK+KXwXDlAYqGtJa/8saRSSU4DdV89yG5ihvTFgP+Huw== dependencies: "@gorhom/bottom-sheet" "^4.6.4" dayjs "1.10.5" @@ -6853,7 +6853,7 @@ stream-chat-react-native-core@5.41.0: path "0.12.7" react-native-markdown-package "1.8.2" react-native-url-polyfill "^1.3.0" - stream-chat "8.42.0" + stream-chat "8.44.0" "stream-chat-react-native-core@link:../../package": version "0.0.0" @@ -6863,10 +6863,25 @@ stream-chat-react-native-core@5.41.0: version "0.0.0" uid "" -stream-chat@8.42.0: - version "8.42.0" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.42.0.tgz#124ea2c10c6e8f7990304e1101c66751daf63e6c" - integrity sha512-8xZz+fmdHSOa3L1rHUOC4Wah+ipvLvdiOmeOfGK6uXnLOKlSHMOblwmQErrOoFM4SKfX9Bea3V8viaKUu6bPng== +stream-chat@8.44.0: + version "8.44.0" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.44.0.tgz#e48446cf91db786e80a2e7358ac4f1601e5e97f0" + integrity sha512-7HNtimD8sT/51rsFibGcD6uBgKj+vlKyYCZMDzjYQEaEsrLqyAg48dOyNM4L2FTF5aXgo9SlxZr21SPleeA2BA== + dependencies: + "@babel/runtime" "^7.16.3" + "@types/jsonwebtoken" "~9.0.0" + "@types/ws" "^7.4.0" + axios "^1.6.0" + base64-js "^1.5.1" + form-data "^4.0.0" + isomorphic-ws "^4.0.1" + jsonwebtoken "~9.0.0" + ws "^7.5.10" + +stream-chat@8.45.1: + version "8.45.1" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.45.1.tgz#001f452520602ebffe45f1634b5f5dd1ff036ec5" + integrity sha512-7OMpL2RHUd+PXSWzhTUAIjjXlI9Oqc4HhUBRfc5i6dK+Ug9S5ertb7RvyzGL5N4ITpq/6ZUAwXtTqRaN9+UUkw== dependencies: "@babel/runtime" "^7.16.3" "@types/jsonwebtoken" "~9.0.0" diff --git a/examples/TypeScriptMessaging/yarn.lock b/examples/TypeScriptMessaging/yarn.lock index de8554e213..b3af9d70da 100644 --- a/examples/TypeScriptMessaging/yarn.lock +++ b/examples/TypeScriptMessaging/yarn.lock @@ -6899,10 +6899,10 @@ statuses@~1.5.0: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== -stream-chat-react-native-core@5.41.0: - version "5.41.0" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.41.0.tgz#defaeee932459c6357147c553167adee8d34493d" - integrity sha512-x46BYWWfRaRw3FbLLzCoJP636jHQrX+my9DG680t9p8wNWKX59imnqX9LjZVcOYo45vpJ8T5Zjs0kYXbDgppTQ== +stream-chat-react-native-core@5.42.2: + version "5.42.2" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.42.2.tgz#edb92b490d4beb894ba549c7deefc770f501360c" + integrity sha512-eA2fK3eYdhr2RSbB22s1ha29y4EPbj9yPAskWxGo1aJK+KXwXDlAYqGtJa/8saRSSU4DdV89yG5ihvTFgP+Huw== dependencies: "@gorhom/bottom-sheet" "^4.6.4" dayjs "1.10.5" @@ -6915,7 +6915,7 @@ stream-chat-react-native-core@5.41.0: path "0.12.7" react-native-markdown-package "1.8.2" react-native-url-polyfill "^1.3.0" - stream-chat "8.42.0" + stream-chat "8.44.0" "stream-chat-react-native-core@link:../../package": version "0.0.0" @@ -6930,10 +6930,25 @@ stream-chat-react-native-devtools@^1.1.0: version "0.0.0" uid "" -stream-chat@8.42.0: - version "8.42.0" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.42.0.tgz#124ea2c10c6e8f7990304e1101c66751daf63e6c" - integrity sha512-8xZz+fmdHSOa3L1rHUOC4Wah+ipvLvdiOmeOfGK6uXnLOKlSHMOblwmQErrOoFM4SKfX9Bea3V8viaKUu6bPng== +stream-chat@8.44.0: + version "8.44.0" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.44.0.tgz#e48446cf91db786e80a2e7358ac4f1601e5e97f0" + integrity sha512-7HNtimD8sT/51rsFibGcD6uBgKj+vlKyYCZMDzjYQEaEsrLqyAg48dOyNM4L2FTF5aXgo9SlxZr21SPleeA2BA== + dependencies: + "@babel/runtime" "^7.16.3" + "@types/jsonwebtoken" "~9.0.0" + "@types/ws" "^7.4.0" + axios "^1.6.0" + base64-js "^1.5.1" + form-data "^4.0.0" + isomorphic-ws "^4.0.1" + jsonwebtoken "~9.0.0" + ws "^7.5.10" + +stream-chat@8.45.1: + version "8.45.1" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.45.1.tgz#001f452520602ebffe45f1634b5f5dd1ff036ec5" + integrity sha512-7OMpL2RHUd+PXSWzhTUAIjjXlI9Oqc4HhUBRfc5i6dK+Ug9S5ertb7RvyzGL5N4ITpq/6ZUAwXtTqRaN9+UUkw== dependencies: "@babel/runtime" "^7.16.3" "@types/jsonwebtoken" "~9.0.0" diff --git a/package/expo-package/yarn.lock b/package/expo-package/yarn.lock index fc09f09afe..fde2c7fb4e 100644 --- a/package/expo-package/yarn.lock +++ b/package/expo-package/yarn.lock @@ -2929,10 +2929,10 @@ stream-buffers@2.2.x: resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" integrity sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg== -stream-chat-react-native-core@5.42.1: - version "5.42.1" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.42.1.tgz#4e58ae50130b7ce47bfe13f76f970a6b1688eb97" - integrity sha512-GVFtsjup3pjx9yN1i5suGIG/I14dSmgY/7bOq0n3NXxrf5i3IiWTjogk4m9N51P94VzNHENZQtd/lxa3hli35A== +stream-chat-react-native-core@5.42.2: + version "5.42.2" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.42.2.tgz#edb92b490d4beb894ba549c7deefc770f501360c" + integrity sha512-eA2fK3eYdhr2RSbB22s1ha29y4EPbj9yPAskWxGo1aJK+KXwXDlAYqGtJa/8saRSSU4DdV89yG5ihvTFgP+Huw== dependencies: "@gorhom/bottom-sheet" "^4.6.4" dayjs "1.10.5" diff --git a/package/native-package/yarn.lock b/package/native-package/yarn.lock index e0d686c8ac..e73111725f 100644 --- a/package/native-package/yarn.lock +++ b/package/native-package/yarn.lock @@ -4244,10 +4244,10 @@ statuses@~1.5.0: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== -stream-chat-react-native-core@5.42.1: - version "5.42.1" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.42.1.tgz#4e58ae50130b7ce47bfe13f76f970a6b1688eb97" - integrity sha512-GVFtsjup3pjx9yN1i5suGIG/I14dSmgY/7bOq0n3NXxrf5i3IiWTjogk4m9N51P94VzNHENZQtd/lxa3hli35A== +stream-chat-react-native-core@5.42.2: + version "5.42.2" + resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.42.2.tgz#edb92b490d4beb894ba549c7deefc770f501360c" + integrity sha512-eA2fK3eYdhr2RSbB22s1ha29y4EPbj9yPAskWxGo1aJK+KXwXDlAYqGtJa/8saRSSU4DdV89yG5ihvTFgP+Huw== dependencies: "@gorhom/bottom-sheet" "^4.6.4" dayjs "1.10.5" diff --git a/package/yarn.lock b/package/yarn.lock index f25887e86f..056f9600ae 100644 --- a/package/yarn.lock +++ b/package/yarn.lock @@ -10664,10 +10664,10 @@ stream-browserify@^2.0.1: inherits "~2.0.1" readable-stream "^2.0.2" -stream-chat@8.44.0: - version "8.44.0" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.44.0.tgz#e48446cf91db786e80a2e7358ac4f1601e5e97f0" - integrity sha512-7HNtimD8sT/51rsFibGcD6uBgKj+vlKyYCZMDzjYQEaEsrLqyAg48dOyNM4L2FTF5aXgo9SlxZr21SPleeA2BA== +stream-chat@8.45.1: + version "8.45.1" + resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.45.1.tgz#001f452520602ebffe45f1634b5f5dd1ff036ec5" + integrity sha512-7OMpL2RHUd+PXSWzhTUAIjjXlI9Oqc4HhUBRfc5i6dK+Ug9S5ertb7RvyzGL5N4ITpq/6ZUAwXtTqRaN9+UUkw== dependencies: "@babel/runtime" "^7.16.3" "@types/jsonwebtoken" "~9.0.0"