diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-04-30 13:54:10 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-04-30 13:54:13 +0200 |
commit | 9e576f9fbcbcc4603689b0b1215cf3d526bd9616 (patch) | |
tree | ef90a131458a84b4e993ec3d12dd5022a460248a /src/main.cpp | |
parent | 1a967f184e55e2fa989d40e5bbaff3ba1efe54a0 (diff) |
Add timestamp to messages
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 68f9ac0..364b2a9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,6 +16,7 @@ #include <odhtdb/Signature.hpp> #include <odhtdb/bin2hex.hpp> #include <odhtdb/hex2bin.hpp> +#include <ntp/NtpClient.hpp> #include <X11/Xlib.h> using namespace std; @@ -60,7 +61,7 @@ void channelAddStoredMessages(Channel *channel, const odhtdb::DatabaseStorageObj continue; } string msg((const char*)nodeStorageAddedObject->decryptedObject.data.data, nodeStorageAddedObject->decryptedObject.data.size); - channel->addLocalMessage(msg, user); + channel->addLocalMessage(msg, user, ntp::NtpTimestamp::fromCombined(nodeStorageAddedObject->createdTimestamp).seconds); } } } |