From 251e06c50f3a7c88e1cd73465872629a5574a5e0 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 7 Oct 2022 14:51:04 +0200 Subject: [PATCH] :lipstick: --- crates/call/src/room.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/call/src/room.rs b/crates/call/src/room.rs index 1630edb300..21e7c85c7f 100644 --- a/crates/call/src/room.rs +++ b/crates/call/src/room.rs @@ -97,14 +97,12 @@ impl Room { match room .update(&mut cx, |room, cx| { + room.leave_when_empty = true; room.call(recipient_user_id, initial_project_id, cx) }) .await { - Ok(()) => { - room.update(&mut cx, |room, _| room.leave_when_empty = true); - Ok(room) - } + Ok(()) => Ok(room), Err(error) => Err(anyhow!("room creation failed: {:?}", error)), } })