Skip to content

Commit 7e5cec6

Browse files
committed
refactor: simplify self_sent condition
1 parent a7eab13 commit 7e5cec6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/receive_imf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ async fn add_parts(
10431043
// self-sent messages in Saved Messages with own address in the `To` field.
10441044
// New Delta Chat versions may use empty `To` field
10451045
// with only a single `hidden-recipients` group in this case.
1046-
let self_sent = to_ids.is_empty() || (to_ids.len() == 1 && to_id == ContactId::SELF);
1046+
let self_sent = to_ids.len() <= 1 && to_id == ContactId::SELF;
10471047

10481048
if mime_parser.sync_items.is_some() && self_sent {
10491049
chat_id = Some(DC_CHAT_ID_TRASH);

0 commit comments

Comments
 (0)