sysapps / messaging

The messaging API
4 stars 7 forks source link

Message Time Stamp #58

Closed marcoscaceres closed 11 years ago

marcoscaceres commented 11 years ago

Implementation feedback from Mozilla:

We decide to use the device sent/received time for both SMS/MMS messages [6]. If my recall is right, the W3C Messaging API concludes the message sent/received time should reflect the server time. Vicamo and I agree that using the server time is much better than the device time, and it's actually feasible because we can get the server sent/received time in the SMS/MMS headers of transactions. Anyway, our main point is: no matter which to choose, all the time stamps should be based on the same standard so that the messages can be sorted in the correct order.

[6] https://bugzilla.mozilla.org/show_bug.cgi?id=840051

efullea commented 11 years ago

For incoming messages, we should use the time in the message headers since the device time (of the receiving device) is the time when the user receives the message, and it is the sending time that should be shown. Note that using the server time does not mean that this cannot be shown according to the time zone of the user if different from the server.

For outgoing messages device time (of the sending device) and server time should roughly be the same. Since in MMS we don't get the server time when the message submission is ack'ed by the server, then we just can use the sending time by the device.

efullea commented 11 years ago

Gene Lian (@airpingu) 's email:

For incoming messages, we should use the time in the message headers since the device time (of the receiving device) is the time when the user receives the message, and it is the sending time that should be shown. Note that using the server time does not mean that this cannot be shown according to the time zone of the user if different from the server.

This is correct. For the received SMS/MMS, we must be able to have its server time in the headers.

For outgoing messages device time (of the sending device) and server time should roughly be the same. Since in MMS we don't get the server time when the message submission is ack'ed by the server, then we just can use the sending time by the device.

Sounds good! At least for MMS, we don't heve the server time info in the M-Send.conf acknowledgement after sending the M-Send.req request. To make sure all the SMS/MMS messages can be sorted in the correct order, we can uniformly define the sending time as the device time.

efullea commented 11 years ago

See pull request #65