From 0a30dc29bb16867e5f1ac9eb8ee7fe2d0536ab89 Mon Sep 17 00:00:00 2001 From: Alex Emmet <111742636+Alex-Emmet@users.noreply.github.com> Date: Fri, 1 May 2026 13:11:29 +0200 Subject: [PATCH] [Clean] --- src/calls/call_util.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/calls/call_util.rs b/src/calls/call_util.rs index cfe1726..17fefb2 100644 --- a/src/calls/call_util.rs +++ b/src/calls/call_util.rs @@ -93,16 +93,15 @@ pub async fn get_room_metadata(call_id: Uuid) -> Result { } pub async fn set_room_metadata(call_id: Uuid, metadata: String) -> Result<(), ()> { - if let Ok((hostname, api_key, api_secret)) = get_livekit() { - let room_service = RoomClient::with_api_key(&hostname, &api_key, &api_secret); - if let Ok(_) = room_service - .update_room_metadata(&call_id.to_string(), &metadata) - .await - { - return Ok(()); - } - } - return Err(()); + let (hostname, api_key, api_secret) = get_livekit()?; + let room_service = RoomClient::with_api_key(&hostname, &api_key, &api_secret); + + room_service + .update_room_metadata(&call_id.to_string(), &metadata) + .await + .map_err(|_| ())?; + + Ok(()) } pub fn garbage_collect_calls() {