mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
Do not duplicate system messages about timer changes
Instead, replace them with localized stock strings using set_better_msg.
This commit is contained in:
committed by
link2xt
parent
6050f0e2a1
commit
d9314227ee
@@ -653,12 +653,20 @@ async fn add_parts(
|
||||
{
|
||||
match (*chat_id).inner_set_ephemeral_timer(context, timer).await {
|
||||
Ok(()) => {
|
||||
chat::add_info_msg(
|
||||
context,
|
||||
*chat_id,
|
||||
stock_ephemeral_timer_changed(context, timer, from_id).await,
|
||||
)
|
||||
.await;
|
||||
if mime_parser.is_system_message == SystemMessage::EphemeralTimerChanged {
|
||||
set_better_msg(
|
||||
mime_parser,
|
||||
stock_ephemeral_timer_changed(context, timer, from_id).await,
|
||||
);
|
||||
} else {
|
||||
chat::add_info_msg(
|
||||
context,
|
||||
*chat_id,
|
||||
stock_ephemeral_timer_changed(context, timer, from_id).await,
|
||||
)
|
||||
.await;
|
||||
}
|
||||
|
||||
context.emit_event(Event::ChatEphemeralTimerModified {
|
||||
chat_id: *chat_id,
|
||||
timer: timer.to_u32(),
|
||||
|
||||
Reference in New Issue
Block a user