summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_messages.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-09-20 22:25:21 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-09-20 22:25:21 +0300
commit8635f4f728473b81a6f055813e25eaba3c4c5ce8 (patch)
tree289ae2168d3c7e473431a960804b24ae03fa8c66 /protocols/SkypeWeb/src/skype_messages.cpp
parent8d5867276a766c5447e4d4489f4649d7fb04ab72 (diff)
creepy crutch removed that was adding message ids after the binary zero in message text
Diffstat (limited to 'protocols/SkypeWeb/src/skype_messages.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp10
1 files changed, 6 insertions, 4 deletions
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 <http://www.gnu.org/licenses/>.
// 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 */