diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-20 13:34:45 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-20 13:34:45 +0300 |
commit | e96132b4d5344d2d58d247906bcaefccfb9d5253 (patch) | |
tree | 24a9524e4900547f2ba3a461e228fd3c98c0410d /protocols/Discord/src/voice.cpp | |
parent | 4dac8bd56f9116ac76423b2664286ed894ca80c2 (diff) |
DBEVENTINFO::hContact to be returned inside an event, no need to call db_event_getContact() just after db_event_get()
Diffstat (limited to 'protocols/Discord/src/voice.cpp')
-rw-r--r-- | protocols/Discord/src/voice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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);
}
|