From 6d2fc32a423b7b470521c67d94d9b59c168a948f Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 28 Aug 2021 12:03:48 +0000 Subject: Show message timestamps --- message.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'message.cpp') diff --git a/message.cpp b/message.cpp index 90723d9..4aae043 100644 --- a/message.cpp +++ b/message.cpp @@ -46,6 +46,12 @@ DcMessage::getState() return dc_msg_get_state(m_message); } +QDateTime +DcMessage::getTimestamp() +{ + return QDateTime::fromSecsSinceEpoch (dc_msg_get_timestamp(m_message), Qt::UTC); +} + void DcMessage::setText(QString text) { -- cgit v1.2.3-70-g09d2