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/Discord/src/proto.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'protocols/Discord') 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; } //////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3