From 438729255b8d62ddac0688011e5fe9641db696f7 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 1 Nov 2020 13:34:14 +0100 Subject: Matrix: immediately remove room from gui on leave instead of waiting for sync response --- src/plugins/Matrix.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index d143e9a..22c2447 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -2580,6 +2580,13 @@ namespace QuickMedia { std::string server_response; DownloadResult download_result = download_to_string(homeserver + "/_matrix/client/r0/rooms/" + room_id + "/leave", server_response, std::move(additional_args), use_tor, true); + if(download_result == DownloadResult::OK) { + RoomData *room = get_room_by_id(room_id); + if(!room) { + delegate->leave_room(room, LeaveType::LEAVE, ""); + remove_room(room_id); + } + } return download_result_to_plugin_result(download_result); } -- cgit v1.2.3