From c8becd7ba500802bbb23b986108ad965d4f31df5 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 26 Mar 2019 11:58:12 +0900 Subject: Room::canSwitchVersions(): return false on tombstoned rooms A softer take on #306. --- lib/room.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/room.cpp') diff --git a/lib/room.cpp b/lib/room.cpp index ce7bae04..18dacbaa 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -600,6 +600,9 @@ void Room::markAllMessagesAsRead() bool Room::canSwitchVersions() const { + if (!successorId().isEmpty()) + return false; // Noone can upgrade a room that's already upgraded + // TODO, #276: m.room.power_levels const auto* plEvt = d->currentState.value({"m.room.power_levels", ""}); -- cgit v1.2.3