diff options
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index af97dc11..580d04b8 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1604,7 +1604,22 @@ bool isEchoEvent(const RoomEventPtr& le, const PendingEventItem& re) bool Room::supportsCalls() const { - return joinedCount() == 2; + return joinedCount() == 2; +} + +void Room::checkVersion() +{ + const auto defaultVersion = connection()->defaultRoomVersion(); + const auto stableVersions = connection()->stableRoomVersions(); + Q_ASSERT(!defaultVersion.isEmpty() && successorId().isEmpty()); + if (!stableVersions.contains(version())) + { + qCDebug(MAIN) << this << "version is" << version() + << "which the server doesn't count as stable"; + // TODO: m.room.power_levels + qCDebug(MAIN) << "The current user has enough privileges to fix it"; + emit unstableVersion(defaultVersion, stableVersions); + } } void Room::inviteCall(const QString& callId, const int lifetime, |