From 8c685b4ae5b47e55a55f23e16ccbda0132cb60c5 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 10 Mar 2019 16:59:55 +0900 Subject: Room::checkVersion(): be tolerant to already upgraded rooms --- lib/connection.cpp | 3 +-- lib/room.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/connection.cpp b/lib/connection.cpp index 26b40c03..59aca025 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -271,8 +271,7 @@ void Connection::reloadCapabilities() Q_ASSERT(!d->capabilities.roomVersions.omitted()); emit capabilitiesLoaded(); for (auto* r: d->roomMap) - if (r->joinState() == JoinState::Join && r->successorId().isEmpty()) - r->checkVersion(); + r->checkVersion(); }); } diff --git a/lib/room.cpp b/lib/room.cpp index 5da9373e..f2e03e94 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1634,7 +1634,7 @@ void Room::checkVersion() { const auto defaultVersion = connection()->defaultRoomVersion(); const auto stableVersions = connection()->stableRoomVersions(); - Q_ASSERT(!defaultVersion.isEmpty() && successorId().isEmpty()); + Q_ASSERT(!defaultVersion.isEmpty()); // This method is only called after the base state has been loaded // or the server capabilities have been loaded. emit stabilityUpdated(defaultVersion, stableVersions); -- cgit v1.2.3