diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js index de88c3331..7650d24ee 100644 --- a/js/ui/telepathyClient.js +++ b/js/ui/telepathyClient.js @@ -44,11 +44,16 @@ let contactFeatures = [Tp.ContactFeature.ALIAS, function makeMessageFromTpMessage(tpMessage, direction) { let [text, flags] = tpMessage.to_text(); + + let timestamp = tpMessage.get_sent_timestamp(); + if (timestamp == 0) + timestamp = tpMessage.get_received_timestamp(); + return { messageType: tpMessage.get_message_type(), text: text, sender: tpMessage.sender.alias, - timestamp: tpMessage.get_received_timestamp(), + timestamp: timestamp, direction: direction }; }