mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36:29 +03:00
refactor: receive_imf: Check for better_msg emptiness before per-part loop
Empty `better_msg` is returned from `apply_group_changes()` when a group member addition/removal message has no effect. It's not clear why `better_msg` was checked and `chat_id` set to `DC_CHAT_ID_TRASH` in the per-part loop.
This commit is contained in:
@@ -1954,6 +1954,12 @@ async fn add_parts(
|
|||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Empty `better_msg` is returned from `apply_group_changes()` when a group member
|
||||||
|
// addition/removal message has no effect.
|
||||||
|
if better_msg == Some(String::new()) && is_partial_download.is_none() {
|
||||||
|
chat_id = DC_CHAT_ID_TRASH;
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(node_addr) = mime_parser.get_header(HeaderDef::IrohNodeAddr) {
|
if let Some(node_addr) = mime_parser.get_header(HeaderDef::IrohNodeAddr) {
|
||||||
match mime_parser.get_header(HeaderDef::InReplyTo) {
|
match mime_parser.get_header(HeaderDef::InReplyTo) {
|
||||||
Some(in_reply_to) => match rfc724_mid_exists(context, in_reply_to).await? {
|
Some(in_reply_to) => match rfc724_mid_exists(context, in_reply_to).await? {
|
||||||
|
|||||||
Reference in New Issue
Block a user