diff options
author | George Hazan <george.hazan@gmail.com> | 2015-02-10 21:31:29 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-02-10 21:31:29 +0000 |
commit | 85f31b137eb97138e81a185185882d445903f84d (patch) | |
tree | 695227cb1b51abef21ba41304193bd3dbf1af0e1 /protocols/WhatsApp/src/messages.cpp | |
parent | e3506fe66886912cee16a91793d17010a87eecef (diff) |
sender's time ignored to prevent message reordering
git-svn-id: http://svn.miranda-ng.org/main/trunk@12086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/messages.cpp')
-rw-r--r-- | protocols/WhatsApp/src/messages.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/WhatsApp/src/messages.cpp b/protocols/WhatsApp/src/messages.cpp index 390ad9a5dc..4525e09b96 100644 --- a/protocols/WhatsApp/src/messages.cpp +++ b/protocols/WhatsApp/src/messages.cpp @@ -32,7 +32,7 @@ void WhatsAppProto::onMessageForMe(const FMessage &pMsg) PROTORECVEVENT recv = { 0 };
recv.flags = PREF_UTF;
recv.szMessage = const_cast<char*>(msg.c_str());
- recv.timestamp = pMsg.timestamp;
+ recv.timestamp = time(NULL);
ProtoChainRecvMsg(hContact, &recv);
}
@@ -124,9 +124,9 @@ void WhatsAppProto::onMessageStatusUpdate(const FMessage &fmsg) int msgId = atoi(fmsg.key.id.substr(delim+1).c_str());
ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)msgId, 0);
- time_t timestamp = atol(fmsg.key.id.substr(0, delim).c_str());
+ time_t ts = atol(fmsg.key.id.substr(0, delim).c_str());
TCHAR ttime[64];
- _tcsftime(ttime, SIZEOF(ttime), _T("%X"), localtime(×tamp));
+ _tcsftime(ttime, SIZEOF(ttime), _T("%X"), localtime(&ts));
utils::setStatusMessage(hContact, CMString(FORMAT, TranslateT("Message received: %s by %s"), ttime, ptszBy));
}
|