diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-03-26 11:58:12 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-03-26 11:59:20 +0900 |
commit | c8becd7ba500802bbb23b986108ad965d4f31df5 (patch) | |
tree | 25c4872f9f86550fad7a8316f2b5235e49764328 /lib/room.cpp | |
parent | adcea5868d45610be0539af3e1cfc15f8495815c (diff) | |
download | libquotient-c8becd7ba500802bbb23b986108ad965d4f31df5.tar.gz libquotient-c8becd7ba500802bbb23b986108ad965d4f31df5.zip |
Room::canSwitchVersions(): return false on tombstoned rooms
A softer take on #306.
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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", ""}); |