diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-21 19:12:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-21 19:12:48 +0300 |
commit | 7bff3e1aac8de58db4817117f1c5605deeb48228 (patch) | |
tree | e119c774419d5073b0462390b4d801988d8727bc /src/core/stdmsg | |
parent | a1f1a18075ef6f7afe38d437e92e7b422e7e4179 (diff) |
StdMsg: fix for setting message ids
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/cmdlist.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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);
|