From 8635f4f728473b81a6f055813e25eaba3c4c5ce8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 20 Sep 2018 22:25:21 +0300 Subject: creepy crutch removed that was adding message ids after the binary zero in message text --- protocols/SkypeWeb/src/skype_messages.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 9ca334c122..b5df2ffea4 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -22,16 +22,18 @@ along with this program. If not, see . // incoming message flow int CSkypeProto::OnReceiveMessage(MCONTACT hContact, const char *szContent, const char *szMessageId, time_t timestamp, int emoteOffset, bool isRead) { - PROTORECVEVENT recv = { 0 }; + PROTORECVEVENT recv = {}; recv.timestamp = timestamp; recv.szMessage = mir_strdup(szContent); recv.lParam = emoteOffset; - recv.pCustomData = (void*)mir_strdup(szMessageId); - recv.cbCustomDataSize = (DWORD)mir_strlen(szMessageId); if (isRead) recv.flags |= PREF_CREATEREAD; - return ProtoChainRecvMsg(hContact, &recv); + MEVENT hDbEvent = ProtoChainRecvMsg(hContact, &recv); + if (hDbEvent) + db_event_setId(m_szModuleName, hDbEvent, szMessageId); + + return hDbEvent; } /* MESSAGE SENDING */ -- cgit v1.2.3