GetStream / stream-chat-js

JS / Browser Client - Build Chat with GetStream.io
https://getstream.io/chat/
Other
183 stars 77 forks source link

bug: thread unread count persist even after a channel has been disabled #1322

Open kennyvallejodev opened 5 months ago

kennyvallejodev commented 5 months ago

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Go to a Thread and do your thing (either with another user send a reply or something) so you get a thread unread count
  2. Go to the channel and mark it as disabled (or deleted it)
  3. unexpected behavior thread unread count is still there

Expected behavior

for the threads_unread_count definitely it should omit the channels that are disabled/deleted same for client.queryThreads this will fetch messages from channels that are disabled (or even parent messages that are deleted lol)

Screenshots

If applicable, add screenshots to help explain your problem.

Package version

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

Add any other context about the problem here.

MartinCupela commented 5 months ago

Hello @kennyvallejodev could you specify how do you "disable" the channel?

kennyvallejodev commented 5 months ago

in our backend doing a partial update

    channel.updatePartial({ set: { disabled: true } }),
kennyvallejodev commented 5 months ago

@MartinCupela do you have an update or were able to repro it?

Dunno if i should post this issue in here or in the core stream-chat repo.

Right now this issue is kinda blocking a feature that i'm working on.

kennyvallejodev commented 5 months ago

Any update here?

MartinCupela commented 5 months ago

Hey @kennyvallejodev this feature is not yet supported by the SDK. I am passing the issue to stream-chat-js repo.

@vishalnarkhede could you please take a look at this request?

kennyvallejodev commented 5 months ago

can someone.... reply? at least mark the issue as confirmed lol? has been almost a month

myandrienko commented 2 months ago

Hi @kennyvallejodev,

Sorry it took longer to reply. I couldn't reproduce the problem when deleting a channel, the unread count updates correctly in that case as far as I can see.

However, I can confirm that there's a bug when marking a channel as disabled. Threads in a disabled channel still count as unread, which is unexpected behavior.

I have forwarded this information to the backend team. We'll keep this issue open and update you on progress. Thanks for your report!