diff --git a/docusaurus/docs/reactnative/common-content/ui-components/channel/props/thread.mdx b/docusaurus/docs/reactnative/common-content/ui-components/channel/props/thread.mdx index 399a824def..8632c95045 100644 --- a/docusaurus/docs/reactnative/common-content/ui-components/channel/props/thread.mdx +++ b/docusaurus/docs/reactnative/common-content/ui-components/channel/props/thread.mdx @@ -1,4 +1,6 @@ -A message object that when set indicates a thread is open. +Can be either a `MessageType` object or a [`ThreadType`](https://github.com/GetStream/stream-chat-react-native/blob/develop/package/src/contexts/threadContext/ThreadContext.tsx) that when set indicates a thread is open. +Both of the types may be used interchangeably. + When used with the [`Thread`](../../../../ui-components/thread.mdx) component this will display the thread. When used with the standard [`MessageList`](../../../../ui-components/message-list.mdx) component this will prevent any singleton components in the [`OverlayProvider`](../../../../core-components/overlay-provider.mdx) form getting out of sync. diff --git a/docusaurus/docs/reactnative/hooks/poll/use-poll-state.mdx b/docusaurus/docs/reactnative/hooks/poll/use-poll-state.mdx index ae8fbc710f..c3ec9b4bf5 100644 --- a/docusaurus/docs/reactnative/hooks/poll/use-poll-state.mdx +++ b/docusaurus/docs/reactnative/hooks/poll/use-poll-state.mdx @@ -39,7 +39,7 @@ A property containing the number of answers (comments) to the `poll`. | -------- | | `number` | -### `created_by` +### `createdBy` A property containing information about the user who created the `poll`. Its type can be found [here](https://github.com/GetStream/stream-chat-js/blob/b447512922b19bc7e3668bd9df81debcb673dd81/src/types.ts) under `UserResponse`. @@ -57,7 +57,7 @@ A property depicting whether each user should have only one and unique vote or t | --------- | | `boolean` | -### `is_closed` +### `isClosed` A property depicting whether the `poll` is still open for voting or not. @@ -75,7 +75,7 @@ This property is not available for anonymous polls. | -------------------------- | | `Record` | -### `max_votes_allowed` +### `maxVotesAllowed` A property containing the maximum number of votes allowed per user. diff --git a/docusaurus/docs/reactnative/state-and-offline-support/state-overview.mdx b/docusaurus/docs/reactnative/state-and-offline-support/state-overview.mdx index 0e1c119758..aa2ac804a2 100644 --- a/docusaurus/docs/reactnative/state-and-offline-support/state-overview.mdx +++ b/docusaurus/docs/reactnative/state-and-offline-support/state-overview.mdx @@ -393,13 +393,13 @@ Please keep in mind that `message.poll` is not going to be reactive, but will ra The React Native SDK provides 2 utility hooks to help with consuming the `poll` state. They can be found listed below: -- [`usePollStateStore`](./hooks/poll/use-poll-state-store.mdx) -- [`usePollState`](./hooks/poll/use-poll-state.mdx) +- [`usePollStateStore`](../hooks/poll/use-poll-state-store.mdx) +- [`usePollState`](../hooks/poll/use-poll-state.mdx) Similarly to the `threads` feature, one can also directly use `useStateStore` and access `StreamChat.polls.fromState().state` through custom `selector`s. :::note -Both `usePollStateStore` and `usePollState` can only be used in children of a [`PollContext`](./contexts/poll-context.mdx). This impediment does not exist however on `useStateStore`. +Both `usePollStateStore` and `usePollState` can only be used in children of a [`PollContext`](../contexts/poll-context.mdx). This impediment does not exist however on `useStateStore`. ::: Due to this, all `poll` related components within the SDK are self-wrapped within a `PollContext` and require `message` and `poll` as mandatory props. diff --git a/docusaurus/docs/reactnative/ui-components/thread.mdx b/docusaurus/docs/reactnative/ui-components/thread.mdx index 294074208e..32103e6b74 100644 --- a/docusaurus/docs/reactnative/ui-components/thread.mdx +++ b/docusaurus/docs/reactnative/ui-components/thread.mdx @@ -23,7 +23,7 @@ const App = () => { return ( - + // highlight-next-line diff --git a/examples/ExpoMessaging/yarn.lock b/examples/ExpoMessaging/yarn.lock index 48fd048ebd..0ae2aa17fd 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.39.6: - version "5.39.6" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.39.6.tgz#bc40925070a55e45afb98d6518c899ab80273486" - integrity sha512-DlPC4UzBa/aP7UeT/e0axJ/S4y3QQ1TS6oxrYVQlZGasFxgmL+OUDfoj6HwX9J/DOSrogw9/YF6yZLXTorlB/g== +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== dependencies: "@gorhom/bottom-sheet" "^4.6.4" dayjs "1.10.5" @@ -7326,16 +7326,16 @@ stream-chat-react-native-core@5.39.6: path "0.12.7" react-native-markdown-package "1.8.2" react-native-url-polyfill "^1.3.0" - stream-chat "8.41.1" + stream-chat "8.42.0" "stream-chat-react-native-core@link:../../package": version "0.0.0" uid "" -stream-chat@8.41.1: - version "8.41.1" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.41.1.tgz#c991980b800b67ec38202a1aa3bbbd4112ccb5fa" - integrity sha512-WV0mHHm88D4RbAV42sD0+SqTWLCvjIwfGZ3nSBXRAuGpVYJEqnNUhEd4OIQ+YrXVbjY7qWz9L5XRk5fZIfE9kg== +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== dependencies: "@babel/runtime" "^7.16.3" "@types/jsonwebtoken" "~9.0.0" diff --git a/examples/SampleApp/ios/Podfile.lock b/examples/SampleApp/ios/Podfile.lock index 0cf42f1873..fc24f34dc7 100644 --- a/examples/SampleApp/ios/Podfile.lock +++ b/examples/SampleApp/ios/Podfile.lock @@ -1541,7 +1541,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: d3f49c53809116a5d38da093a8aa78bf551aed09 - DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 + DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 FBLazyVector: 56e0e498dbb513b96c40bac6284729ba4e62672d FBReactNativeSpec: 146c741a3f40361f6bc13a4ba284678cbedb5881 Firebase: 91fefd38712feb9186ea8996af6cbdef41473442 @@ -1556,7 +1556,7 @@ SPEC CHECKSUMS: FirebaseRemoteConfigInterop: 6efda51fb5e2f15b16585197e26eaa09574e8a4d FirebaseSessions: dbd14adac65ce996228652c1fc3a3f576bdf3ecc fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 + glog: fdfdfe5479092de0c4bdbebedd9056951f092c4f GoogleAppMeasurement: f3abf08495ef2cba7829f15318c373b8d9226491 GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15 @@ -1637,4 +1637,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 751ee2c534898a790da0a7dba7d623f1f21ae757 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/examples/SampleApp/ios/SampleApp.xcodeproj/project.pbxproj b/examples/SampleApp/ios/SampleApp.xcodeproj/project.pbxproj index fdbe27f968..c055eda859 100644 --- a/examples/SampleApp/ios/SampleApp.xcodeproj/project.pbxproj +++ b/examples/SampleApp/ios/SampleApp.xcodeproj/project.pbxproj @@ -686,7 +686,10 @@ "-DFOLLY_USE_LIBCPP=1", "-DFOLLY_CFG_NO_COROUTINES=1", ); - OTHER_LDFLAGS = "$(inherited) "; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; @@ -817,7 +820,10 @@ "-DFOLLY_USE_LIBCPP=1", "-DFOLLY_CFG_NO_COROUTINES=1", ); - OTHER_LDFLAGS = "$(inherited) "; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; diff --git a/examples/SampleApp/yarn.lock b/examples/SampleApp/yarn.lock index a8f10687db..5bb870ebe7 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.39.6: - version "5.39.6" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.39.6.tgz#bc40925070a55e45afb98d6518c899ab80273486" - integrity sha512-DlPC4UzBa/aP7UeT/e0axJ/S4y3QQ1TS6oxrYVQlZGasFxgmL+OUDfoj6HwX9J/DOSrogw9/YF6yZLXTorlB/g== +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== dependencies: "@gorhom/bottom-sheet" "^4.6.4" dayjs "1.10.5" @@ -6853,7 +6853,7 @@ stream-chat-react-native-core@5.39.6: path "0.12.7" react-native-markdown-package "1.8.2" react-native-url-polyfill "^1.3.0" - stream-chat "8.41.1" + stream-chat "8.42.0" "stream-chat-react-native-core@link:../../package": version "0.0.0" @@ -6863,21 +6863,6 @@ stream-chat-react-native-core@5.39.6: version "0.0.0" uid "" -stream-chat@8.41.1: - version "8.41.1" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.41.1.tgz#c991980b800b67ec38202a1aa3bbbd4112ccb5fa" - integrity sha512-WV0mHHm88D4RbAV42sD0+SqTWLCvjIwfGZ3nSBXRAuGpVYJEqnNUhEd4OIQ+YrXVbjY7qWz9L5XRk5fZIfE9kg== - 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.42.0: version "8.42.0" resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.42.0.tgz#124ea2c10c6e8f7990304e1101c66751daf63e6c" diff --git a/examples/TypeScriptMessaging/ios/Podfile.lock b/examples/TypeScriptMessaging/ios/Podfile.lock index fe92f553a6..bfb945d6c3 100644 --- a/examples/TypeScriptMessaging/ios/Podfile.lock +++ b/examples/TypeScriptMessaging/ios/Podfile.lock @@ -1429,7 +1429,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: d3f49c53809116a5d38da093a8aa78bf551aed09 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 + DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 FBLazyVector: f64d1e2ea739b4d8f7e4740cde18089cd97fe864 FBReactNativeSpec: 9f2b8b243131565335437dba74923a8d3015e780 Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 @@ -1441,7 +1441,7 @@ SPEC CHECKSUMS: Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 + glog: 69ef571f3de08433d766d614c73a9838a06bf7eb hermes-engine: 9cecf9953a681df7556b8cc9c74905de8f3293c0 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c @@ -1511,4 +1511,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 90406e1e85c82b37484f5d746afa45c0637bb4b3 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/examples/TypeScriptMessaging/yarn.lock b/examples/TypeScriptMessaging/yarn.lock index f5f4802635..de8554e213 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.39.6: - version "5.39.6" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.39.6.tgz#bc40925070a55e45afb98d6518c899ab80273486" - integrity sha512-DlPC4UzBa/aP7UeT/e0axJ/S4y3QQ1TS6oxrYVQlZGasFxgmL+OUDfoj6HwX9J/DOSrogw9/YF6yZLXTorlB/g== +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== dependencies: "@gorhom/bottom-sheet" "^4.6.4" dayjs "1.10.5" @@ -6915,7 +6915,7 @@ stream-chat-react-native-core@5.39.6: path "0.12.7" react-native-markdown-package "1.8.2" react-native-url-polyfill "^1.3.0" - stream-chat "8.41.1" + stream-chat "8.42.0" "stream-chat-react-native-core@link:../../package": version "0.0.0" @@ -6930,10 +6930,10 @@ stream-chat-react-native-devtools@^1.1.0: version "0.0.0" uid "" -stream-chat@8.41.1: - version "8.41.1" - resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.41.1.tgz#c991980b800b67ec38202a1aa3bbbd4112ccb5fa" - integrity sha512-WV0mHHm88D4RbAV42sD0+SqTWLCvjIwfGZ3nSBXRAuGpVYJEqnNUhEd4OIQ+YrXVbjY7qWz9L5XRk5fZIfE9kg== +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== 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 0578dcd1a7..5503dc63ea 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.40.0: - version "5.40.0" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.40.0.tgz#edb325c81c6ba63f3f6f1f23acec7408ed63ef4c" - integrity sha512-zTAg29l1U3LLU1ZdmyicBbOekGgiyXJxcGXtlYbwCZdvY+mhAVh9zhL9y9GIIx/Mdox1U06s5bQXcKbQsLeuqg== +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== 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 9b53f0d7cd..d3225642f9 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.40.0: - version "5.40.0" - resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.40.0.tgz#edb325c81c6ba63f3f6f1f23acec7408ed63ef4c" - integrity sha512-zTAg29l1U3LLU1ZdmyicBbOekGgiyXJxcGXtlYbwCZdvY+mhAVh9zhL9y9GIIx/Mdox1U06s5bQXcKbQsLeuqg== +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== dependencies: "@gorhom/bottom-sheet" "^4.6.4" dayjs "1.10.5" diff --git a/package/src/components/Channel/Channel.tsx b/package/src/components/Channel/Channel.tsx index 2266914d2e..5e8cba928e 100644 --- a/package/src/components/Channel/Channel.tsx +++ b/package/src/components/Channel/Channel.tsx @@ -2516,8 +2516,10 @@ const ChannelWithContext = < export type ChannelProps< StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, -> = Partial, 'channel'>> & - Pick, 'channel'>; +> = Partial, 'channel' | 'thread'>> & + Pick, 'channel'> & { + thread?: MessageType | ThreadType | null; + }; /** *