I am using twilio conversation api for chat application. I have enabled read horizon from settings. I am marking message read index and also getting unread count. But when I refresh the page lastMessageRead index is always null. I have added screenshot for update and null. I don't is it a bug in SDK of what. I am adding screenshot of service setting as well. Need help what I am doing wrong.
Asked
Active
Viewed 572 times
2
-
How are you loading those conversations onto the page to get that attribute. – philnash Aug 17 '21 at 07:09
-
Using join event – Ghazanfar Khan Aug 17 '21 at 11:14
-
Can you share the code you’re using? – philnash Aug 17 '21 at 11:15
-
const Conversations = require('@twilio/conversations'); // getting token from server const client = await Conversations.Client.create(res.token); client.on('conversationJoined', throttle((conversation) => {})); – Ghazanfar Khan Aug 17 '21 at 11:24
-
every time I reconnect the client one of the participant has updated read index but conversation overall is null, but when I update it , it becomes available. – Ghazanfar Khan Aug 17 '21 at 11:25
-
Sorry for the delay here, the team was checking in on this. We think this is a bug and are raising a ticket internally to work out what is going on. – philnash Aug 23 '21 at 22:59
-
Can you confirm which version of twilio-conversations you are using? – philnash Aug 24 '21 at 07:18
-
its 1.1.0 version – Ghazanfar Khan Aug 24 '21 at 12:14
-
I have raised this as an issue internally, but just to make sure, can you update the SDK to the latest [version 1.2.3](https://www.npmjs.com/package/@twilio/conversations/v/1.2.3) and let me know if it is still happening? – philnash Aug 25 '21 at 03:24
-
Ok, for a workaround we moved to setAllMessageRead() function instead of index based marking. – Ghazanfar Khan Aug 25 '21 at 14:00
-
@GhazanfarKhan did it fix the index becoming null after you restart client? The two seem to be unrelated. – berkus Sep 07 '21 at 16:36
-
1Yes seems like its fixed I have index when I restart client. – Ghazanfar Khan Sep 07 '21 at 17:04
-
@GhazanfarKhan This is very suspicious, I don't see how setting the index differently could've affected the property on the other side. Could you share your (relevant) code somewhere? – berkus Sep 07 '21 at 17:07
-
I updated the library as you told then that fixed the issue. – Ghazanfar Khan Sep 07 '21 at 18:25
-
Okay then, it's fine. – berkus Sep 08 '21 at 05:38
1 Answers
0
If you get a conversationJoined event, this means you have left it before?
If you leave the conversation at some point, the read horizon will be cleared.

berkus
- 1,552
- 12
- 16