From f6e7c1be2d87482b20d242cc029085dc10cfee86 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Mon, 20 May 2019 11:13:34 +0300 Subject: dbx_sqlite: add record to srt table for subcontact --- plugins/Dbx_sqlite/src/dbevents.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'plugins/Dbx_sqlite/src') diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index 028ce0e94d..ae0aad2357 100755 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -179,11 +179,21 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, DBEVENTINFO *dbei) sqlite3_bind_int64(stmt, 3, dbei->timestamp); rc = sqlite3_step(stmt); assert(rc == SQLITE_DONE); - sqlite3_reset(stmt); + sqlite3_reset(stmt); //is this necessary ? cc->AddEvent(hDbEvent, dbei->timestamp, !dbei->markedRead()); if (ccSub != nullptr) + { + stmt = evt_stmts_prep[SQL_EVT_STMT_ADDEVENT_SRT]; + sqlite3_bind_int64(stmt, 1, hDbEvent); + sqlite3_bind_int64(stmt, 2, ccSub->contactID); + sqlite3_bind_int64(stmt, 3, dbei->timestamp); + rc = sqlite3_step(stmt); + assert(rc == SQLITE_DONE); + sqlite3_reset(stmt); //is this necessary ? + ccSub->AddEvent(hDbEvent, dbei->timestamp, !dbei->markedRead()); + } char *module = m_modules.find(dbei->szModule); if (module == nullptr) -- cgit v1.2.3