mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user