From c47575eb8d6481350414df1e2f9b4209158990b6 Mon Sep 17 00:00:00 2001 From: April John Date: Mon, 3 Feb 2025 14:00:28 +0100 Subject: [PATCH] aaa --- src/versia/inbox.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/versia/inbox.rs b/src/versia/inbox.rs index 082cff7..f4afa60 100644 --- a/src/versia/inbox.rs +++ b/src/versia/inbox.rs @@ -152,14 +152,13 @@ async fn get_inbox_vec(ap_note: &crate::objects::post::Note) -> Vec { let mut inbox_users: Vec = Vec::new(); let mut inbox: Vec = Vec::new(); - for entry in ap_note.to.clone() { - if entry.to_string().eq_ignore_ascii_case(public().to_string().as_str()) { - let (_, mentions) = ap_note.to.split_at(2); - inbox_users.append(&mut mentions.to_vec()); - } else { - let (_, mentions) = ap_note.to.split_at(1); - inbox_users.append(&mut mentions.to_vec()); - } + let entry = ap_note.to.get(0).unwrap(); + if entry.to_string().eq_ignore_ascii_case(public().to_string().as_str()) { + let (_, mentions) = ap_note.to.split_at(2); + inbox_users.append(&mut mentions.to_vec()); + } else { + let (_, mentions) = ap_note.to.split_at(1); + inbox_users.append(&mut mentions.to_vec()); } inbox_users.dedup();