fix: display correct timer value for ephemeral timer changes

The timer change should not disappear,
but should display correct timer change.
This commit is contained in:
link2xt
2025-07-31 13:54:57 +00:00
committed by l
parent 4a1a2122f0
commit ba76944d75
2 changed files with 17 additions and 13 deletions

View File

@@ -1835,6 +1835,8 @@ async fn add_parts(
{
Some(stock_str::msg_location_enabled_by(context, from_id).await)
} else if mime_parser.is_system_message == SystemMessage::EphemeralTimerChanged {
let better_msg = stock_ephemeral_timer_changed(context, ephemeral_timer, from_id).await;
// Do not delete the system message itself.
//
// This prevents confusion when timer is changed
@@ -1843,7 +1845,7 @@ async fn add_parts(
// week is left.
ephemeral_timer = EphemeralTimer::Disabled;
Some(stock_ephemeral_timer_changed(context, ephemeral_timer, from_id).await)
Some(better_msg)
} else {
None
};