ChatSecure / ChatSecure-iOS

ChatSecure is a free and open source encrypted chat client for iOS that supports OTR and OMEMO encryption over XMPP.
https://chatsecure.org
Other
3.13k stars 1.02k forks source link

Wrong time stamps on offline messages. #781

Open cringeops opened 7 years ago

cringeops commented 7 years ago

The way it works:

  1. Your buddy sends you a message when your ChatSecure is closed (of course, you don't get any notification).
  2. You open ChatSecure and get the message, it time-marked as it was just sent.

The way it should work:

  1. Buddy sends you a message.
  2. You open ChatSecure and see the message with corrent time stamp.

Don't know about others, but absence of this feature makes me sad( As well as lack of normal working pushes, Apple messes it up with background refresh.

My offer is to put UTC time of sending in the message header, and correct it against local time on receiving device. I'm not very much into XML thing, but it seems possible.

chrisballinger commented 7 years ago

This code for this already exists for some delayed message scenarios, and both the original send date and received date are stored internally. We were unsure what to do about situations where you receive delayed messages so far back in your timeline that you never see them. Most messengers treat the most recently received message as the newest regardless of what order and when it was sent. Perhaps a compromise would be to indicate when a message was delayed and display the original date it was claimed to be sent.

cringeops commented 7 years ago

I think it might be solved after implementing push notifications (that actually works). XMPP was developed for desktop messaging, which means the messenger is always online, hence no need for time stamps at all (displayed time is time of receipt, that's it).