From 7bff3e1aac8de58db4817117f1c5605deeb48228 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 21 Nov 2018 19:12:48 +0300 Subject: StdMsg: fix for setting message ids --- src/core/stdmsg/src/cmdlist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp index a8fc3446ae..0058d1489e 100644 --- a/src/core/stdmsg/src/cmdlist.cpp +++ b/src/core/stdmsg/src/cmdlist.cpp @@ -97,13 +97,13 @@ void msgQueue_processack(MCONTACT hContact, int id, BOOL success, LPARAM lParam) dbei.pBlob = (PBYTE)p->szMsg; MessageWindowEvent evt = { id, hContact, &dbei }; - MEVENT hNewEvent = NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt); - if (hNewEvent && lParam) - db_event_setId(dbei.szModule, hNewEvent, (char*)lParam); + NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt); p->szMsg = (char*)dbei.pBlob; - db_event_add(hContact, &dbei); + MEVENT hNewEvent = db_event_add(hContact, &dbei); + if (hNewEvent && lParam) + db_event_setId(dbei.szModule, hNewEvent, (char*)lParam); mir_free(p->szMsg); mir_free(p); -- cgit v1.2.3