aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/room.cpp')
-rw-r--r--lib/room.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index 0a4fcc68..a46892f3 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -461,6 +461,10 @@ Room::Room(Connection* connection, QString id, JoinState initialJoinState)
}
});
d->loadMegOlmSessions();
+
+ connect(this, &Room::beforeDestruction, this, [=](){
+ connection->database()->clearRoomData(id);
+ });
#endif
qCDebug(STATE) << "New" << terse << initialJoinState << "Room:" << id;
}