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

Timestamps for queued messages should reflect when they were queued, not when they were sent. #2678

Open
ara4n opened this issue Dec 28, 2024 · 0 comments

Comments

@ara4n
Copy link
Member

ara4n commented Dec 28, 2024

Your use case

What would you like to do?

When a message can't be sent, and it's magically queued by the app instead, the timestamp presented when the message finally sends is the origin_server_ts at the point the origin client manages to deliver it to the origin server.

This is very confusing UX-wise, as now the queue can flush in the background or on app FG without user interaction, it makes it look as if the user has consciously sent the msg at the point the queue flushes rather than when they sent the message, which can cause serious confusion.

I've had this twice now over the last few days:

Screenshot 2024-12-28 at 12 39 50

^ This message was actually sent at 10pm the previous night during a server outage. However, it now looks like it's reporting issues at 5am the next day (whereas this is presumably when the msg queue was flushed)

Screenshot 2024-12-28 at 12 41 52

^ and here's another one.

Why would you like to do it?

To stop confusing users; stale messages should be clearly marked as stale and show when the sender intended to send them - not when the app happened to flush its queue in the bg.

How would you like to achieve it?

Either:

  • Add a new timestamp called origin_client_ts to distinguish the claimed time a msg was created v. when the origin server received it. Clients would then use origin_client_ts for the timestamps shown in the UI. (This was my original intention when proposing origin_server_ts as the longwinded explicit ts name in the first place back in 2014).
  • Or one could allow users to massage their own timestamps, as if they were an application service: https://spec.matrix.org/unstable/application-service-api/#timestamp-massaging. This is horrid as it abuses origin_server_ts to mean origin_client_ts, and means we'd lose the actual origin_server_ts, which would then be subject to abuse by malicious clients or those with unsynced clocks.

Have you considered any alternatives?

Going back to 2014 and slapping myself for speccing origin_server_ts but not origin_client_ts. (The intention was also to have destination_server_ts and destination_client_ts for the full enchilada of the trapezium routing timings, although uses for those are less obvious)

Additional context

Filing this on meta given it affects all clients.

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

1 participant