From 436e303e24e5046d6cc52ac3da51a0b51adbef36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 15 Jun 2020 18:35:21 +0300 Subject: simpler way of applying server ids to messages --- plugins/Scriver/src/globals.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/Scriver/src') diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index ac1d9be163..6c017b7266 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -149,14 +149,13 @@ static int ackevent(WPARAM, LPARAM lParam) dbei.timestamp = time(0); dbei.cbBlob = (int)mir_strlen(item->sendBuffer) + 1; dbei.pBlob = (PBYTE)item->sendBuffer; + dbei.szId = (char *)pAck->lParam; MessageWindowEvent evt = { item->hSendId, hContact, &dbei }; NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt); item->sendBuffer = (char *)dbei.pBlob; - MEVENT hNewEvent = db_event_add(hContact, &dbei); - if (hNewEvent && pAck->lParam) - db_event_setId(dbei.szModule, hNewEvent, (char *)pAck->lParam); + db_event_add(hContact, &dbei); if (item->hwndErrorDlg != nullptr) DestroyWindow(item->hwndErrorDlg); -- cgit v1.2.3