Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛] Client UIKit and SDK are incompatible for Threads #2579

Open
8 tasks
oddanderson opened this issue Jul 3, 2024 · 1 comment
Open
8 tasks

[🐛] Client UIKit and SDK are incompatible for Threads #2579

oddanderson opened this issue Jul 3, 2024 · 1 comment

Comments

@oddanderson
Copy link

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. 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-native version 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


@khushal87
Copy link
Member

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants