From e96132b4d5344d2d58d247906bcaefccfb9d5253 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Dec 2023 13:34:45 +0300 Subject: DBEVENTINFO::hContact to be returned inside an event, no need to call db_event_getContact() just after db_event_get() --- protocols/Discord/src/voice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/Discord/src/voice.cpp') diff --git a/protocols/Discord/src/voice.cpp b/protocols/Discord/src/voice.cpp index 5d1ccf1ea7..48e5290c23 100644 --- a/protocols/Discord/src/voice.cpp +++ b/protocols/Discord/src/voice.cpp @@ -42,7 +42,7 @@ void CDiscordProto::OnCommandCallCreated(const JSONNode &pRoot) dbei.timestamp = pCall->startTime; dbei.eventType = EVENT_INCOMING_CALL; dbei.cbBlob = uint32_t(mir_strlen(szMessage) + 1); - dbei.pBlob = (uint8_t *)szMessage; + dbei.pBlob = szMessage; dbei.flags = DBEF_UTF; db_event_add(pUser->hContact, &dbei); } @@ -76,7 +76,7 @@ void CDiscordProto::OnCommandCallDeleted(const JSONNode &pRoot) dbei.timestamp = currTime; dbei.eventType = EVENT_CALL_FINISHED; dbei.cbBlob = uint32_t(szMessage.GetLength() + 1); - dbei.pBlob = (uint8_t *)szMessage.c_str(); + dbei.pBlob = szMessage.GetBuffer(); dbei.flags = DBEF_UTF; db_event_add(pUser->hContact, &dbei); } -- cgit v1.2.3