mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
Simplify saving original chat ID
This commit is contained in:
@@ -847,22 +847,15 @@ async fn add_parts(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if is_mdn {
|
let orig_chat_id = chat_id;
|
||||||
chat_id = Some(DC_CHAT_ID_TRASH);
|
let chat_id = if is_mdn || is_reaction {
|
||||||
}
|
DC_CHAT_ID_TRASH
|
||||||
|
|
||||||
let orig_reaction_chat_id = if is_reaction {
|
|
||||||
let orig_reaction_chat_id = chat_id;
|
|
||||||
chat_id = Some(DC_CHAT_ID_TRASH);
|
|
||||||
orig_reaction_chat_id
|
|
||||||
} else {
|
} else {
|
||||||
None
|
chat_id.unwrap_or_else(|| {
|
||||||
};
|
|
||||||
|
|
||||||
let chat_id = chat_id.unwrap_or_else(|| {
|
|
||||||
info!(context, "No chat id for message (TRASH)");
|
info!(context, "No chat id for message (TRASH)");
|
||||||
DC_CHAT_ID_TRASH
|
DC_CHAT_ID_TRASH
|
||||||
});
|
})
|
||||||
|
};
|
||||||
|
|
||||||
// Extract ephemeral timer from the message or use the existing timer if the message is not fully downloaded.
|
// Extract ephemeral timer from the message or use the existing timer if the message is not fully downloaded.
|
||||||
let mut ephemeral_timer = if is_partial_download.is_some() {
|
let mut ephemeral_timer = if is_partial_download.is_some() {
|
||||||
@@ -1071,7 +1064,7 @@ async fn add_parts(
|
|||||||
set_msg_reaction(
|
set_msg_reaction(
|
||||||
context,
|
context,
|
||||||
&mime_in_reply_to,
|
&mime_in_reply_to,
|
||||||
orig_reaction_chat_id.unwrap_or_default(),
|
orig_chat_id.unwrap_or_default(),
|
||||||
from_id,
|
from_id,
|
||||||
Reaction::from(part.msg.as_str()),
|
Reaction::from(part.msg.as_str()),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user