summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src/dbevents.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-10-02 14:15:18 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-10-02 14:15:18 +0300
commitfb7edbe76a928d134fd334e5bad68e32096e0424 (patch)
tree34b5f491d81a1b930e819d4b8d6fcc420c515567 /plugins/Dbx_sqlite/src/dbevents.cpp
parenta6821e1eefdbd4c428a62bfd41cb2bf1f9fa7f39 (diff)
fixes #3700 )dbx_sqlite: удаление истории метаконтакта оставляет пустые события)
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbevents.cpp')
-rw-r--r--plugins/Dbx_sqlite/src/dbevents.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index 70766e48b1..ac2261c60d 100644
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -198,11 +198,10 @@ int CDbxSQLite::DeleteEventSrt(MCONTACT hContact, int64_t ts)
return rc;
}
-int CDbxSQLite::DeleteEventSrt2(MCONTACT hContact, MEVENT hDbEvent)
+int CDbxSQLite::DeleteEventSrt2(MEVENT hDbEvent)
{
- auto *stmt = InitQuery("DELETE FROM events_srt WHERE contact_id = ? AND id = ?;", qEvDelSrt2);
- sqlite3_bind_int64(stmt, 1, hContact);
- sqlite3_bind_int64(stmt, 2, hDbEvent);
+ auto *stmt = InitQuery("DELETE FROM events_srt WHERE id = ?;", qEvDelSrt2);
+ sqlite3_bind_int64(stmt, 1, hDbEvent);
int rc = sqlite3_step(stmt);
logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt);
@@ -239,7 +238,7 @@ BOOL CDbxSQLite::DeleteEvent(MEVENT hDbEvent)
if (rc != SQLITE_DONE)
return 1;
- rc = DeleteEventSrt2(hContact, hDbEvent);
+ rc = DeleteEventSrt2(hDbEvent);
if (rc != SQLITE_DONE)
return 1;