aboutsummaryrefslogtreecommitdiff
path: root/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'connection.cpp')
-rw-r--r--connection.cpp5
1 files changed, 4 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