aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-15 12:24:41 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-15 12:24:41 +0900
commit5ac901775c5ebd39338ae7854d2c3391cf9084fa (patch)
treee343f57590def239c4c1303ed9bce9670098d243 /lib
parent0f4368a19e344c8e3d74d97d4c9de171e723a9a1 (diff)
downloadlibquotient-5ac901775c5ebd39338ae7854d2c3391cf9084fa.tar.gz
libquotient-5ac901775c5ebd39338ae7854d2c3391cf9084fa.zip
Room::upgraded()
A signal emitted when the room receives a tombstone event from the server.
Diffstat (limited to 'lib')
-rw-r--r--lib/room.cpp3
-rw-r--r--lib/room.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index 6b9702cd..af97dc11 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -2160,6 +2160,9 @@ Room::Changes Room::processStateEvent(const RoomEvent& e)
emit encryption(); // It can only be done once, so emit it here.
return EncryptionOn;
}
+ , [this] (const RoomTombstoneEvent& evt) {
+ emit upgraded(evt.serverMessage(), evt.successorRoomId());
+ }
);
}
diff --git a/lib/room.h b/lib/room.h
index ef832d1a..137b383d 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -528,6 +528,10 @@ namespace QMatrixClient
void fileTransferCancelled(QString id);
void callEvent(Room* room, const RoomEvent* event);
+
+ /// This room has been upgraded and won't receive updates anymore
+ void upgraded(QString serverMessage, QString successorId);
+
/// The room is about to be deleted
void beforeDestruction(Room*);