diff options
author | George Hazan <ghazan@miranda.im> | 2018-09-21 17:32:41 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-09-21 17:32:41 +0300 |
commit | 9f9082d49aaaf924f5d00c634641b3da0d115890 (patch) | |
tree | a659bf5de2115ee5893ad7531e4d85161b7dc708 /src/core/stdmsg | |
parent | d3aa476a211b9e9d8ac6f97aa2ae6df05609733c (diff) |
if a protocol receives a message delivery confirmation, it can pass the server id for an event as LPCSTR into lParam of ProtoBroadcastAck
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/cmdlist.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp index 8532ae8249..b15cc9b8ef 100644 --- a/src/core/stdmsg/src/cmdlist.cpp +++ b/src/core/stdmsg/src/cmdlist.cpp @@ -77,14 +77,14 @@ TMsgQueue* msgQueue_find(MCONTACT hContact, int id) return nullptr;
}
-void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char *szErr)
+void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char *lParam)
{
TMsgQueue *p = msgQueue_find(hContact, id);
if (p == nullptr)
return;
if (!success) {
- MessageFailureProcess(p, szErr);
+ MessageFailureProcess(p, lParam);
return;
}
@@ -97,7 +97,9 @@ void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char *sz dbei.pBlob = (PBYTE)p->szMsg;
MessageWindowEvent evt = { id, hContact, &dbei };
- NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt);
+ MEVENT hNewEvent = NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt);
+ if (hNewEvent && lParam)
+ db_event_setId(dbei.szModule, hNewEvent, lParam);
p->szMsg = (char*)dbei.pBlob;
|