From 8ab45308a3e218ac2638ec12f2203c68e11559b5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 8 Apr 2014 19:44:08 +0000 Subject: fix for disabled metas & tabSRMM container creation git-svn-id: http://svn.miranda-ng.org/main/trunk@8894 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbevents.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/Db3x_mmap') diff --git a/plugins/Db3x_mmap/src/dbevents.cpp b/plugins/Db3x_mmap/src/dbevents.cpp index 66dded5f16..1cdc3bd191 100644 --- a/plugins/Db3x_mmap/src/dbevents.cpp +++ b/plugins/Db3x_mmap/src/dbevents.cpp @@ -46,6 +46,7 @@ STDMETHODIMP_(HANDLE) CDb3Mmap::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei) dbe.cbBlob = dbei->cbBlob; BYTE *pBlob = dbei->pBlob; + MCONTACT contactNotifyID = contactID; DBCachedContact *ccSub = NULL; if (contactID != 0) { DBCachedContact *cc = m_cache->GetCachedContact(contactID); @@ -57,10 +58,12 @@ STDMETHODIMP_(HANDLE) CDb3Mmap::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei) // set default sub to the event's source db_mc_setDefault(cc->parentID, contactID); contactID = cc->parentID; // and add an event to a metahistory + if (db_mc_isEnabled()) + contactNotifyID = contactID; } } - if (NotifyEventHooks(hEventFilterAddedEvent, contactID, (LPARAM)dbei)) + if (NotifyEventHooks(hEventFilterAddedEvent, contactNotifyID, (LPARAM)dbei)) return NULL; mir_ptr pCryptBlob; @@ -154,7 +157,7 @@ STDMETHODIMP_(HANDLE) CDb3Mmap::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei) // Notify only in safe mode or on really new events if (neednotify) - NotifyEventHooks(hEventAddedEvent, contactID, (LPARAM)ofsNew); + NotifyEventHooks(hEventAddedEvent, contactNotifyID, (LPARAM)ofsNew); return (HANDLE)ofsNew; } -- cgit v1.2.3