Finding the message a quote refers to #494
Replies: 1 comment 1 reply
-
Another important case: delivery statuses / read receipts. I was wondering about this too when working with those type of messages: Is the timestamp enough to uniquely identify a message? No, but it's not only the timestamp that gets referenced in those messages: for read receipts and deleted messages there is also the sender ( For there to be ambiguity, a single sender needs to send two or more messages with the same timestamp (i.e. in the same millisecond). This can not really happen even if the sender is typing very fast on any of the official signal clients :) Even trying it with signal-cli, I couldn't get it to assign the same timestamp to two messages
here In principle, I suppose this could happen if, e.g. two messages are sent from two different devices linked to the same account, and they just happen to get the same timestamp. But the likelihood of that is so remote and the consequences are so benign that I think it's not worth much consideration. BTW, I would like to know whether signal clients like signal-cli get the timestamps from the signal servers as a reply of a successfully sent message. If that's the case, the server can sort out the incoming messages from every sender, and no 'timestamp collision' would be possible even in principle. |
Beta Was this translation helpful? Give feedback.
-
I always found it odd how Signal in general uses timestamps as message Ids. For the most part its fine, Signal-Cli's receive command gives us messages in chronological order anyways, however I feel quotes could be a bit problematic. Since they use the timestamp of the quoted message to refer to said message, how would we know which message it was referring to if we happened to receive two or more messages from the same chat which happened to have the same timestamp because they were sent so close together? Or is there some fail-safe to prevent situations like this from occurring?
And I guess this also applies for reacts and deleted messages.
Beta Was this translation helpful? Give feedback.
All reactions