From 9f9082d49aaaf924f5d00c634641b3da0d115890 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 21 Sep 2018 17:32:41 +0300 Subject: if a protocol receives a message delivery confirmation, it can pass the server id for an event as LPCSTR into lParam of ProtoBroadcastAck --- plugins/Scriver/src/globals.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/Scriver/src') diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index f529234937..a878f8a2ae 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -156,7 +156,9 @@ static int ackevent(WPARAM, LPARAM lParam) NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt); item->sendBuffer = (char *)dbei.pBlob; - db_event_add(hContact, &dbei); + MEVENT hNewEvent = db_event_add(hContact, &dbei); + if (hNewEvent && pAck->lParam) + db_event_setId(dbei.szModule, hNewEvent, (char *)pAck->lParam); if (item->hwndErrorDlg != nullptr) DestroyWindow(item->hwndErrorDlg); -- cgit v1.2.3