mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +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 {
|
if mime_parser.incoming {
|
||||||
to_id = ContactId::SELF;
|
to_id = ContactId::SELF;
|
||||||
|
|
||||||
let test_normal_chat = if from_id == ContactId::UNDEFINED {
|
let test_normal_chat = ChatIdBlocked::lookup_by_contact(context, from_id).await?;
|
||||||
None
|
|
||||||
} else {
|
|
||||||
ChatIdBlocked::lookup_by_contact(context, from_id).await?
|
|
||||||
};
|
|
||||||
|
|
||||||
if chat_id.is_none() && mime_parser.delivery_report.is_some() {
|
if chat_id.is_none() && mime_parser.delivery_report.is_some() {
|
||||||
chat_id = Some(DC_CHAT_ID_TRASH);
|
chat_id = Some(DC_CHAT_ID_TRASH);
|
||||||
|
|||||||
Reference in New Issue
Block a user