refactor: simplify self_sent condition

This commit is contained in:
link2xt
2025-01-04 23:47:43 +00:00
committed by l
parent a7eab13ad6
commit 7e5cec66ba

View File

@@ -1043,7 +1043,7 @@ async fn add_parts(
// self-sent messages in Saved Messages with own address in the `To` field.
// New Delta Chat versions may use empty `To` field
// with only a single `hidden-recipients` group in this case.
let self_sent = to_ids.is_empty() || (to_ids.len() == 1 && to_id == ContactId::SELF);
let self_sent = to_ids.len() <= 1 && to_id == ContactId::SELF;
if mime_parser.sync_items.is_some() && self_sent {
chat_id = Some(DC_CHAT_ID_TRASH);