Added deletion markup for the message that the master password isn't set

This commit is contained in:
StNicolay 2023-05-07 16:37:56 +03:00
parent fd94cb317f
commit ef3a188120
Signed by: StNicolay
GPG Key ID: 9693D04DCD962B0D

View File

@ -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<Option<String>> {
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(())
}