Read Receipts time

Hi, the methods available to get read receipts information getReadStatus and getReadMembers don’t provide any data about the time when the message was read.

const members = channel.getReadMembers(lastMessage);
const readStatus = channel.getReadStatus();

Both members and readStatus give somewhat the same information:

connectionStatus: "offline"
friendDiscoveryKey: null
friendName: null
isActive: true
isBlockedByMe: false
isBlockingMe: false
lastSeenAt: 1590097503081
metaData: {}
nickname: ""
profileUrl: ""
state: "joined"
userId: "<someid>"
_preferredLanguages: null

Is there any way to get the time when a message was read?
There is no mention of it in the documentation: https://docs.sendbird.com/javascript/group_channel_advanced#3_retrieve_members_who_have_read_a_message

Thanks

1 Like

@adrienplg It sounds like you are looking for historical information at the individual message level when that specific message was read, but that isn’t how it works. It is more like a bookmark in a book, rather than marking off each page in a book that is read. You may have read the pages in the first chapter six month ago or 5 minutes ago, but you can’t look at a specific page and know when that page was read. Only where your current spot in the book is.
Chat read receipts work the same way.

From what you are saying, there are indeed no timestamps available for when a message was read. Such feature would however be very helpful, as most common chats are using it (imessage, messenger, whatsapp, etc.).
The book analogy you are using can be simplified to saying that Sendbird only keeps track of the last message that a user has seen, although this information doesn’t seem readily available from the APIs I mentioned.

1 Like

@adrienplg I believe that is true for 1:1 messaging on iMessage and the like, but not for group messaging. As soon as you go to group messaging, keeping track of individual read times is quickly not feasible. If it is important to keep track of when a message is read, you could handle this yourself in some manner using the Webhook notification for a message read. https://docs.sendbird.com/platform/webhooks#3_group_channel_message_read.

@Doug_Exner I’m not sure why you are saying that keeping individual read times is not feasible for group messaging. From a back-end perspective, this data can easily be stored.
Thank you for the link though, it is helpful.

1 Like

@Doug_Exner Piggy backing off of this issue… can I get an explanation for what the timestamps in GroupChannel.prototype.getReadStatus represent? The documentation makes it sound like the last_seen_at property would represent the time at which that user had a markAsRead event triggered for the channel from their account. But when I inspect those values, they always correspond to the createdAt timestamp for the most recently read message.

Similar, in the group_channel:message_read event in the webhooks, the read_ts always matches the created_at of the most recently sent message at the time of the event firing, and does not correspond to the time that the event was triggered. This is extremely counterintuitive, almost to the point of me wondering if this is a bug…

1 Like