add_parts: call get_parent_message only once

This commit is contained in:
link2xt
2021-01-23 03:39:20 +03:00
committed by link2xt
parent e9c582c4e4
commit b938d5facd

View File

@@ -525,7 +525,7 @@ async fn add_parts(
if Blocked::Not == create_blocked {
chat_id.unblock(context).await;
chat_id_blocked = Blocked::Not;
} else if get_parent_message(context, mime_parser).await?.is_some() {
} else if parent.is_some() {
// we do not want any chat to be created implicitly. Because of the origin-scale-up,
// the contact requests will pop up and this should be just fine.
Contact::scaleup_origin_by_id(context, from_id, Origin::IncomingReplyTo).await;