stream-chat-react-native
stream-chat-react-native copied to clipboard
[🐛] Client UIKit and SDK are incompatible for Threads
Issue
The UIKit for Threads requires a MessageType object for the following code snippet:
<Channel channel={channel} thread={thread}>
However, the SDK to query both messages and threads returns objects that cannot be used as MessageType. e.g.
const threadMessage = await chatClient.getMessage(messageId); --> GetMessageAPIResponse<StreamChatGenerics>
const threads = await chatClient?.queryThreads({filter_logic}); --> Thread<StreamChatGenerics>[]
As a result, there is no way to query a thread object via the SDK and a messageId, and then render a thread on the screen. Currently. the only way to get a thread object is to do so from within MessageContext.
This means it's not possible in the React Native UIKit to receive a push notification about a comment on a message, and then take the user to a thread detail screen with the comments underneath.
I have verified that all other SDKs (React, Swift, Android) contain this functionality, allowing the UIKit to take a messageId: String parameter to render a thread list.
Steps to reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error etc...
Expected behavior
Project Related Information
Customization
Click To Expand
# N/A
Offline support
- [ ] I have enabled offline support.
- [ ] The feature I'm having does not occur when offline support is disabled. (stripe out if not applicable)
Environment
Click To Expand
package.json:
# N/A
react-native info output:
OUTPUT GOES HERE
- Platform that you're experiencing the issue on:
- [ ] iOS
- [ ] Android
- [ ] iOS but have not tested behavior on Android
- [ ] Android but have not tested behavior on iOS
- [ ] Both
stream-chat-react-nativeversion you're using that has this issue:e.g. 5.4.3
- Device/Emulator info:
- [ ] I am using a physical device
- OS version:
e.g. Android 10 - Device/Emulator:
e.g. iPhone 11
Additional context
Screenshots
Click To Expand
Hey @oddanderson, we have recently introduced a thread list, and that might help you with this. https://getstream.io/chat/docs/sdk/reactnative/guides/custom-thread-list/