-
Notifications
You must be signed in to change notification settings - Fork 325
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
initial unread message count is always zero #2635
Comments
I should add that this with |
Confirmed options being sent in the API request: Smells like a client-side issue to me, since it seems you're organizing messages based on some timestamp watermark. What I did note is that the last_active date for the user I load the channels for is always updated to the load time even if in this case it's unclear the user actually read the messages when I could just be looking at a channel list. I'm referencing the date I see under |
@vanGalilea can you help me with this? i notice you looked into a related issue recently |
@sterlingwes We found a bug in the RN SDK relevant to the unread count state. Could you please upgrade your RN SDK to v5.12.0 and check if its fixed |
@santhoshvai as I've noted here this is reproducible on web, pls confirm this is the same issue |
I looked at the changelog you linked and that tells me you haven't even read this issue to understand my problem |
still an issue with your update... |
@sterlingwes Apologies here, I did fix a relevant issue in RN SDK related to stale unread counts and I read your issue only after that. We will investigate this scenario and get back to you. |
hey @santhoshvai do you have an ETA on your investigation for this? |
@sterlingwes this is still in our backlog, please follow this issue for future updates. |
Hi @sterlingwes , I spent quite a bit of time debugging this and trying to reproduce the issue - but to no avail (went so far as to spin up both custom apps as well as using channel querying directly to see the values). In all instances, I have found that:
I'm under the impression that the issue most likely got fixed since it was reported (since it's really been a while, apologies for that !), or perhaps I'm doing something wrong while debugging. If you're available and up for it, would you be willing to give it a brief look on whether you can still reproduce this ? If not then we can close the issue and reopen it if something similar still persists. Thanks a ton for your analysis ! |
Closing this issue for long time of inactivity and unabable to reproduce it. This might be fixed with past releases. Please upgrade to the latest version and let us know. Feel free to reopen it if you still see this as an issue. |
I am having the same issue using stream-chat-expo. Just reinstalled to 5.44.2 and having the same issue. After this code |
I'm trying to do a simple thing:
Given the above, I figured I would call
countUnread()
on the channel to get the initial count of unread messages.To test this I setup a channel with two users and had one user send a message to the channel before I loaded the UI in question for the second user.
Problem: I can not get the initial unread count to be anything but 0
I've tried the following code in our React Native app and in a minimal repro web app with the same result:
As you can see, when the page loads I log the channel read state (thought reaching into
state
might give me more visibility than the count unread method would) and send a message to the channel. Second page to load should see an unread count of 1 due to the first page load sendMessage.In the log output I see zeros for anything related to unread message counts. The
last_read
timestamp seems to be the time the page loaded, oddly enough - so it seems something in your backend system or in this library is marking the channel read before I can get an unread count.The text was updated successfully, but these errors were encountered: