diff --git a/api/src/routes/ws/threads_and_messages/messages_utils.rs b/api/src/routes/ws/threads_and_messages/messages_utils.rs index f33ea2e97..1b6d4463b 100644 --- a/api/src/routes/ws/threads_and_messages/messages_utils.rs +++ b/api/src/routes/ws/threads_and_messages/messages_utils.rs @@ -84,7 +84,9 @@ pub async fn get_message_with_permission( } }; - let final_permission = if permission.is_none() && !is_public_thread { + let final_permission = if permission.is_some() { + permission.unwrap() + } else if !is_public_thread { return Err(anyhow!("No message found with permissions")); } else { AssetPermissionRole::Viewer