refactor(receive_imf): do not check for ContactId::UNDEFINED

from_id should not be undefined,
we either should create a contact for it by then
or reject the message.
This commit is contained in:
link2xt
2024-05-19 21:44:51 +00:00
parent 6d59fb49aa
commit 46d6b81058

View File

@@ -769,11 +769,7 @@ async fn add_parts(
if mime_parser.incoming {
to_id = ContactId::SELF;
let test_normal_chat = if from_id == ContactId::UNDEFINED {
None
} else {
ChatIdBlocked::lookup_by_contact(context, from_id).await?
};
let test_normal_chat = ChatIdBlocked::lookup_by_contact(context, from_id).await?;
if chat_id.is_none() && mime_parser.delivery_report.is_some() {
chat_id = Some(DC_CHAT_ID_TRASH);