Add info message when autodelete timer is changed

This commit is contained in:
Alexander Krotov
2020-01-06 06:47:28 +01:00
parent 997c5ad68a
commit b4337685cf
4 changed files with 21 additions and 0 deletions

View File

@@ -219,6 +219,13 @@ pub fn dc_receive_imf(
if chat::get_autodelete_timer(context, chat_id) != timer {
match chat::set_autodelete_timer(context, chat_id, timer) {
Ok(()) => {
let stock_str = context.stock_system_msg(
StockMessage::MsgAutodeleteTimerChanged,
timer.to_string(),
"",
from_id,
);
chat::add_info_msg(context, chat_id, stock_str);
context.call_cb(Event::ChatAutodeleteTimerModified { chat_id, timer });
}
Err(err) => {