diff options
-rw-r--r-- | lib/room.cpp | 6 | ||||
-rw-r--r-- | lib/room.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 23fb19db..aa835860 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -29,6 +29,7 @@ #include "csapi/room_send.h" #include "csapi/rooms.h" #include "csapi/tags.h" +#include "csapi/room_upgrades.h" #include "events/simplestateevents.h" #include "events/roomcreateevent.h" #include "events/roomtombstoneevent.h" @@ -791,6 +792,11 @@ void Room::resetHighlightCount() emit highlightCountChanged(this); } +void Room::switchVersion(QString newVersion) +{ + connection()->callApi<UpgradeRoomJob>(id(), newVersion); +} + bool Room::hasAccountData(const QString& type) const { return d->accountData.find(type) != d->accountData.end(); @@ -424,6 +424,9 @@ namespace QMatrixClient /// Mark all messages in the room as read void markAllMessagesAsRead(); + /// Switch the room's version (aka upgrade) + void switchVersion(QString newVersion); + signals: /// Initial set of state events has been loaded /** |