Bug · Messages not being auto marked as read while inside channel
Describe the bug Hey, When you open a channel, it immediately marks all messages as read. However, if you stay in that channel and talk to someone, all of the messages that get sent in that channel will stay marked as 'unread' until you re-open the channel.
This doesn't make much sense, if you have a channel open, then presumably you are reading the messages that are coming through, so these messages should be auto marked as read.
Dev environment info (please complete/provide the following information):
- Package version. 0.6.3
- react-native or expo version n/a
- Device/Emulator (android/ios) and OS version n/a
To Reproduce Steps to reproduce the behavior:
1.Go into a channel 2 send some messages to that channel from another device 3 notice how the messages are unread even if you reply to them.
Expected behavior Messages coming into a channel which you are currently looking at should mark those messages as read.
Screenshots

We are also seeing this behavior, would love to know if there is a workaround or fix.
@charltongroves @kgstaley I am not able to recreate this issue. Can you try updating to the latest version and seeing if the issue is resolved or not. I can dig deeper if that doesn't help fix it
closing from inactivity
I'm seeing this behavior again on android devices. stream-chat version 2.9.0
I'm facing this issue. I tried to mark as read the channel messages manually but still not working. Any thought?
Any thought?
I'm facing the same issue. Any update?
Hey @avivm @Marcoo09 This issue has been resolved as part of 3.9.x. I would recommend upgrading to latest version of stream-chat-react-native
I'm using the following versions and still have the issue. "stream-chat": "^3.13.1", "stream-chat-expo": "^3.9.1",
For anyone with the issue I have fixed it using:
useEffect(() => {
if (channel) {
const unsubscribe = channel.on("message.new", (event) => {
channel.markRead();
});
return () => {
unsubscribe.unsubscribe();
};
}
}, [channel]);
@vishalnarkhede We are facing the same issue in our application on Android. The problem does only occur when the message list in the chat is no longer than your screen size. When having a lot of messages the screen will scroll, and the message read event is dispatched.
An example can be found in the video below.
https://user-images.githubusercontent.com/1516413/152492398-6b9d7955-9fc2-4f72-8323-38f000c973b1.mov
Can this issue be reopened? it's still occurring on Android.
I am having this issue on react client too. Marking messages as read feature is definitely working inconsistently. Sometimes it just works correctly, sometimes you need to open and close channel. I also set up a web push hook and listening those message.read events and I could not figure out what triggers those events or when message is marked as read.