diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/Matrix.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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); } |