aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connection.cpp5
-rw-r--r--connection.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/connection.cpp b/connection.cpp
index f9f1490c..7920125d 100644
--- a/connection.cpp
+++ b/connection.cpp
@@ -207,7 +207,10 @@ JoinRoomJob* Connection::joinRoom(const QString& roomAlias)
void Connection::leaveRoom(Room* room)
{
- callApi<LeaveRoomJob>(room->id());
+ auto job = callApi<LeaveRoomJob>(room->id());
+ connect( job, &BaseJob::success, [=] () {
+ emit leftRoom(room);
+ });
}
RoomMessagesJob* Connection::getMessages(Room* room, const QString& from) const
diff --git a/connection.h b/connection.h
index e3f33155..0b8500b9 100644
--- a/connection.h
+++ b/connection.h
@@ -105,6 +105,7 @@ namespace QMatrixClient
void syncDone();
void newRoom(Room* room);
void joinedRoom(Room* room);
+ void leftRoom(Room* room);
void loginError(QString error);
void networkError(size_t nextAttempt, int inMilliseconds);