summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_sqlite/src')
-rw-r--r--plugins/Dbx_sqlite/src/dbevents.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index ac2261c60d..82b6561562 100644
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -302,7 +302,15 @@ BOOL CDbxSQLite::EditEvent(MEVENT hDbEvent, const DBEVENTINFO *dbei)
lock.unlock();
DBFlush();
- NotifyEventHooks(g_hevEventEdited, GetEventContact(hDbEvent), hDbEvent);
+
+ if (m_safetyMode) {
+ MCONTACT hContact = GetEventContact(hDbEvent);
+ if (auto *cc = m_cache->GetCachedContact(hContact))
+ if (cc->IsSub())
+ hContact = cc->parentID;
+
+ NotifyEventHooks(g_hevEventEdited, hContact, hDbEvent);
+ }
return 0;
}