From 37071053f2bfb38733d0ef912b3a414f67b8be03 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 27 Apr 2018 11:09:35 +0200 Subject: Boltun: fix for storing events into the database --- plugins/Boltun/src/actionQueue.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/Boltun/src/actionQueue.cpp b/plugins/Boltun/src/actionQueue.cpp index ea9b89d215..fbad765f55 100644 --- a/plugins/Boltun/src/actionQueue.cpp +++ b/plugins/Boltun/src/actionQueue.cpp @@ -84,15 +84,13 @@ static bool NotifyTyping(MCONTACT hContact) static void TimerAnswer(MCONTACT hContact, const TalkBot::MessageInfo* info) { T2Utf msg(info->Answer.c_str()); - size_t bufsize = mir_strlen(msg); - ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)msg); DBEVENTINFO dbei = {}; - dbei.cbBlob = (int)bufsize; - dbei.pBlob = (PBYTE)(char*)msg; + dbei.cbBlob = (int)mir_strlen(msg); + dbei.pBlob = msg; dbei.eventType = EVENTTYPE_MESSAGE; - dbei.flags = DBEF_SENT; + dbei.flags = DBEF_SENT | DBEF_UTF; dbei.szModule = BOLTUN_NAME; dbei.timestamp = (DWORD)time(nullptr); -- cgit v1.2.3