Commit 79da08fe authored by Ronan's avatar Ronan

fix(MainDb): commit on markChatMessagesAsRead

parent e3cf0be4
......@@ -1867,6 +1867,7 @@ bool MainDb::deleteEvent (const shared_ptr<const EventLog> &eventLog) {
return L_DB_EXCEPTION_HANDLER_C(&mainDb) {
soci::session *session = mainDb.getPrivate()->dbSession.getBackendSession();
*session << "DELETE FROM event WHERE id = :id", soci::use(dEventKey->storageId);
tr.commit();
dEventLog->dbKey = MainDbEventKey();
......@@ -1875,8 +1876,6 @@ bool MainDb::deleteEvent (const shared_ptr<const EventLog> &eventLog) {
eventLog
)->getChatMessage()->getPrivate()->dbKey = MainDbChatMessageKey();
tr.commit();
return true;
};
}
......@@ -2075,8 +2074,8 @@ void MainDb::markChatMessagesAsRead (const ChatRoomId &chatRoomId) const {
else {
const long long &dbChatRoomId = d->selectChatRoomId(chatRoomId);
*session << query, soci::use(dbChatRoomId);
tr.commit();
}
tr.commit();
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment