From ef3a1881208361a1c66856130410884d78e6dd17 Mon Sep 17 00:00:00 2001 From: StNicolay Date: Sun, 7 May 2023 16:37:56 +0300 Subject: [PATCH] Added deletion markup for the message that the master password isn't set --- src/handlers/master_password_check.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/handlers/master_password_check.rs b/src/handlers/master_password_check.rs index 2542522..cfea4fd 100644 --- a/src/handlers/master_password_check.rs +++ b/src/handlers/master_password_check.rs @@ -2,6 +2,8 @@ use crate::{entity::prelude::MasterPass, errors::NoUserInfo}; use sea_orm::prelude::*; use teloxide::{adaptors::Throttle, dispatching::DpHandlerDescription, prelude::*}; +use super::markups::deletion_markup; + async fn master_pass_exists(msg: Message, db: DatabaseConnection) -> Option> { let user_id = match msg.from() { Some(user) => user.id.0, @@ -23,6 +25,7 @@ async fn notify_about_no_master_pass( return Err(crate::Error::msg(message)); } bot.send_message(msg.chat.id, "No master password set") + .reply_markup(deletion_markup()) .await?; Ok(()) }