Skip to content
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

Add ability to see a timestamp when the message was received / read #671

Open
or-else opened this issue Jun 24, 2021 · 4 comments
Open

Add ability to see a timestamp when the message was received / read #671

or-else opened this issue Jun 24, 2021 · 4 comments

Comments

@or-else
Copy link
Contributor

or-else commented Jun 24, 2021

Is your feature request related to a problem? Please describe.

It maybe useful to see when the message was delivered to each recipient and when it was read.

Describe the solution you'd like

Add message delivery info screen.

@Chr728
Copy link

Chr728 commented Dec 22, 2021

was the feature added or do you want me to add this feature? if possible please give details of what is needed to add.

@or-else
Copy link
Contributor Author

or-else commented Dec 22, 2021

It's not a simple feature. Here is a high-level outline.

Tinode client apps consider a message read when the message appears on the screen for ~500ms. When the message with seq=X is read the client app sends a note to the server that all messages with seq <= X have been read. It does not mean that all these messages appeared on the screen: if the user has 100 unread messages, only 10 or so would fit on the screen but all 100 would be marked as read.

The server records that user U read all messages with seq <= X, but it does not record the time when specific seq was read.

In order to implement this feature correctly you have to store the timestamp of each read receipt for each user. I believe it requires a separate DB table, something like topicID, seq, userID, timestamp. Then this information has to be passed from the server to the client which probably requires modifications to the wire protocol.

It's possible to implement this feature half-way by storing the timestamp of the last read receipt for each user and saving the corresponding timestamp on the client. This would give an approximation of when the message was read.

Overall the feature looks very heavy for the marginal value it provides.

@or-else
Copy link
Contributor Author

or-else commented Dec 22, 2021

@Chr728 If you would like a starter project, this would be a good one: #707
It's relatively simple, well isolated and useful.

@Chr728
Copy link

Chr728 commented Dec 23, 2021

@or-else will try looking at #651 first then if possible will look into #707. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants