diff options
author | George Hazan <ghazan@miranda.im> | 2018-09-20 22:25:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-09-20 22:25:21 +0300 |
commit | 8635f4f728473b81a6f055813e25eaba3c4c5ce8 (patch) | |
tree | 289ae2168d3c7e473431a960804b24ae03fa8c66 /protocols/Discord | |
parent | 8d5867276a766c5447e4d4489f4649d7fb04ab72 (diff) |
creepy crutch removed that was adding message ids after the binary zero in message text
Diffstat (limited to 'protocols/Discord')
-rw-r--r-- | protocols/Discord/src/proto.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index 61ed2237bf..b9acdbf101 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -355,10 +355,11 @@ MCONTACT CDiscordProto::AddToList(int flags, PROTOSEARCHRESULT *psr) MEVENT CDiscordProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *evt) { - T2Utf szResUtf((const wchar_t*)evt->lParam); - evt->pCustomData = (char*)szResUtf; - evt->cbCustomDataSize = (DWORD)mir_strlen(szResUtf); - return CSuper::RecvMsg(hContact, evt); + MEVENT hDbEvent = CSuper::RecvMsg(hContact, evt); + if (hDbEvent && evt->lParam) + db_event_setId(m_szModuleName, hDbEvent, T2Utf((const wchar_t*)evt->lParam)); + + return hDbEvent; } //////////////////////////////////////////////////////////////////////////////////////// |