From a7729e3548fe400ee97202787769dfdf785daa31 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 29 Mar 2025 00:06:50 +0000 Subject: [PATCH] fix: move group name timestamp update up in create_send_msg_jobs() Otherwise outdated timestamp is rendered into the message. --- src/chat.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index af94014ea..28c9785a1 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -3004,6 +3004,12 @@ async fn prepare_send_msg( /// /// The caller has to interrupt SMTP loop or otherwise process new rows. pub(crate) async fn create_send_msg_jobs(context: &Context, msg: &mut Message) -> Result> { + if msg.param.get_cmd() == SystemMessage::GroupNameChanged { + msg.chat_id + .update_timestamp(context, Param::GroupNameTimestamp, msg.timestamp_sort) + .await?; + } + let needs_encryption = msg.param.get_bool(Param::GuaranteeE2ee).unwrap_or_default(); let mimefactory = MimeFactory::from_msg(context, msg.clone()).await?; let attach_selfavatar = mimefactory.attach_selfavatar; @@ -3049,11 +3055,6 @@ pub(crate) async fn create_send_msg_jobs(context: &Context, msg: &mut Message) - msg.state = MessageState::OutDelivered; return Ok(Vec::new()); } - if msg.param.get_cmd() == SystemMessage::GroupNameChanged { - msg.chat_id - .update_timestamp(context, Param::GroupNameTimestamp, msg.timestamp_sort) - .await?; - } let rendered_msg = match mimefactory.render(context).await { Ok(res) => Ok(res),