mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +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 {
|
match (*chat_id).inner_set_ephemeral_timer(context, timer).await {
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
chat::add_info_msg(
|
if mime_parser.is_system_message == SystemMessage::EphemeralTimerChanged {
|
||||||
context,
|
set_better_msg(
|
||||||
*chat_id,
|
mime_parser,
|
||||||
stock_ephemeral_timer_changed(context, timer, from_id).await,
|
stock_ephemeral_timer_changed(context, timer, from_id).await,
|
||||||
)
|
);
|
||||||
.await;
|
} else {
|
||||||
|
chat::add_info_msg(
|
||||||
|
context,
|
||||||
|
*chat_id,
|
||||||
|
stock_ephemeral_timer_changed(context, timer, from_id).await,
|
||||||
|
)
|
||||||
|
.await;
|
||||||
|
}
|
||||||
|
|
||||||
context.emit_event(Event::ChatEphemeralTimerModified {
|
context.emit_event(Event::ChatEphemeralTimerModified {
|
||||||
chat_id: *chat_id,
|
chat_id: *chat_id,
|
||||||
timer: timer.to_u32(),
|
timer: timer.to_u32(),
|
||||||
|
|||||||
Reference in New Issue
Block a user