mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36:29 +03:00
Add stock strings for ephemeral timer changes
This commit is contained in:
committed by
link2xt
parent
059caee527
commit
db6623d0cf
@@ -10,7 +10,7 @@ use crate::constants::*;
|
||||
use crate::contact::*;
|
||||
use crate::context::Context;
|
||||
use crate::dc_tools::*;
|
||||
use crate::ephemeral::Timer as EphemeralTimer;
|
||||
use crate::ephemeral::{stock_ephemeral_timer_changed, Timer as EphemeralTimer};
|
||||
use crate::error::{bail, ensure, format_err, Result};
|
||||
use crate::events::Event;
|
||||
use crate::headerdef::HeaderDef;
|
||||
@@ -653,15 +653,12 @@ async fn add_parts(
|
||||
{
|
||||
match (*chat_id).inner_set_ephemeral_timer(context, timer).await {
|
||||
Ok(()) => {
|
||||
let stock_str = context
|
||||
.stock_system_msg(
|
||||
StockMessage::MsgEphemeralTimerChanged,
|
||||
timer.to_string(),
|
||||
"",
|
||||
from_id,
|
||||
)
|
||||
.await;
|
||||
chat::add_info_msg(context, *chat_id, stock_str).await;
|
||||
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