summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-12-25 21:01:26 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-12-25 21:01:26 +0300
commit0c66b748a7b6b223d34374994e4d7d207e3d2c71 (patch)
treebb960016c02b7ba6a57f342c829b65b00b6d2476 /plugins
parent97e9f52c99a41612fcfef3cae099519c46d55710 (diff)
db_event_replace: new helper to eliminate duplicate events
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Scriver/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index aebeaf2f02..8eecb475ed 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -149,7 +149,7 @@ static int ackevent(WPARAM, LPARAM lParam)
NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt);
item->sendBuffer = (char *)dbei.pBlob;
- db_event_add(hContact, &dbei);
+ db_event_replace(hContact, &dbei);
if (item->hwndErrorDlg != nullptr)
DestroyWindow(item->hwndErrorDlg);
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index bf6d9202fb..4e8372b7e4 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -474,7 +474,7 @@ int SendQueue::ackMessage(CMsgDialog *dat, WPARAM wParam, LPARAM lParam)
NotifyEventHooks(g_chatApi.hevPreCreate, 0, (LPARAM)&evt);
job.szSendBuffer = (char*)dbei.pBlob;
- MEVENT hNewEvent = db_event_add(job.hContact, &dbei);
+ MEVENT hNewEvent = db_event_replace(job.hContact, &dbei);
if (dat)
if (!NEN::bNoSounds && !dat->m_pContainer->cfg.flags.m_bNoSound)