Do not overwrite better_msg if apply_group_changes returns None

This commit is contained in:
link2xt
2022-03-27 11:23:45 +00:00
parent e9a733a789
commit 8c2b9f9901

View File

@@ -600,7 +600,7 @@ async fn add_parts(
}
}
better_msg = apply_group_changes(
better_msg = better_msg.or(apply_group_changes(
context,
mime_parser,
sent_timestamp,
@@ -608,7 +608,7 @@ async fn add_parts(
from_id,
to_ids,
)
.await?;
.await?);
}
if chat_id.is_none() {
@@ -824,7 +824,7 @@ async fn add_parts(
}
if let Some(chat_id) = chat_id {
better_msg = apply_group_changes(
better_msg = better_msg.or(apply_group_changes(
context,
mime_parser,
sent_timestamp,
@@ -832,7 +832,7 @@ async fn add_parts(
from_id,
to_ids,
)
.await?;
.await?);
}
if chat_id.is_none() && self_sent {