Commit de8c673f authored by Ronan's avatar Ronan

fix(MainDb): ensure contents are loaded before add event

parent 9767adcc
......@@ -762,6 +762,9 @@ void ChatMessagePrivate::storeInDb () {
updateInDb();
} else {
shared_ptr<EventLog> eventLog = make_shared<ConferenceChatMessageEvent>(time, q->getSharedFromThis());
// Avoid transaction in transaction if contents are not loaded.
loadContentsFromDatabase();
q->getChatRoom()->getPrivate()->addEvent(eventLog);
if (direction == ChatMessage::Direction::Incoming) {
......
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