stream-chat-react icon indicating copy to clipboard operation
stream-chat-react copied to clipboard

Feature request: Control Visibility of Hidden Channels When New Messages Are Received.

Open Sanjuhub opened this issue 2 years ago • 5 comments

I would like to have more control over the visibility of hidden channels when new messages are received.

Currently, if a channel is hidden using the channel.hide() method and a new message is received on that channel, it will automatically become visible again. This can be problematic for users who wish to keep certain channels hidden for privacy or organizational reasons.

I propose a new feature that allows users to control the visibility of hidden channels when new messages are received. Specifically, I suggest implementing a new option in the channel.hide() method that prevents the channel from automatically becoming visible when a new message is received. Instead, the channel would remain hidden until the user calls channel.show() method on that channel.

This new feature would give users more control over the visibility of their channels and allow them to maintain privacy and organization in their chat rooms.

Sanjuhub avatar Apr 24 '23 10:04 Sanjuhub

Hey @Sanjuhub have you considered to mute the channel?

https://getstream.io/chat/docs/javascript/muting_channels/?language=javascript&q=hide

MartinCupela avatar Apr 25 '23 07:04 MartinCupela

The unread count will not get updated in muted channels. But I need the unread count as well. @MartinCupela

Sanjuhub avatar Apr 25 '23 09:04 Sanjuhub

Then try to stop watch the given channel:

https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript&q=stopWatc#stop-watching-a-channel

MartinCupela avatar Apr 25 '23 13:04 MartinCupela

@Sanjuhub did my last advice solve your problem?

MartinCupela avatar Apr 28 '23 07:04 MartinCupela

No, it was not helpful for us. We have a use case where we are providing users with the option to archive any chat. When a chat is archived, we hide it using the channel.hide() method in the backend. We also have an archive list where users can view the archived channels and send/receive messages, see unread counts, and unarchive channels. However, the current functionality of Stream automatically makes hidden channels visible when new messages are received, which does not solve our problem in this use case.

Sanjuhub avatar Apr 28 '23 09:04 Sanjuhub