diff options
author | George Hazan <george.hazan@gmail.com> | 2023-10-02 15:56:06 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-10-02 15:56:06 +0300 |
commit | fce28529f1b38382c92e1987844cc67250041390 (patch) | |
tree | 279b1d29abc7d4a74e1f98838e629ece1ce73500 | |
parent | 4c6d4277439397a65c48d954578c6b575dbfc7dd (diff) |
fixes #3692 (При редактировании сообщения собеседником прилёт отредактированного сообщения открывает вкладку с субконтактом)
-rw-r--r-- | plugins/Dbx_sqlite/src/dbevents.cpp | 10 |
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;
}
|