From 3fcad50924a01122f3c9b2295d182e93628bbf31 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 1 Dec 2023 22:26:12 +0000 Subject: [PATCH] refactor: move to_ids.is_empty() check into mark_recepients_as_verified() --- src/receive_imf.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/receive_imf.rs b/src/receive_imf.rs index dd6211c31..eec820132 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -2431,10 +2431,6 @@ async fn has_verified_encryption( } } - if to_ids.is_empty() { - return Ok(Verified); - } - mark_recipients_as_verified(context, from_id, to_ids, mimeparser).await?; Ok(Verified) } @@ -2444,7 +2440,11 @@ async fn mark_recipients_as_verified( from_id: ContactId, to_ids: Vec, mimeparser: &MimeMessage, -) -> Result<(), anyhow::Error> { +) -> Result<()> { + if to_ids.is_empty() { + return Ok(()); + } + let rows = context .sql .query_map(