Added GetNewMasterPass state and added restrictions on the master password

This commit is contained in:
2023-06-04 20:41:10 +03:00
parent 4d4cec1353
commit 9d0fa17a0e
7 changed files with 79 additions and 3 deletions

View File

@ -1,6 +1,6 @@
use crate::markups::deletion_markup;
use arrayvec::ArrayString;
use cryptography::password_generation::generate_passwords;
use cryptography::passwords::generate_passwords;
use std::fmt::Write;
use teloxide::{adaptors::Throttle, prelude::*, types::ParseMode};
use tokio::task::spawn_blocking;

View File

@ -44,7 +44,10 @@ pub async fn set_master_pass(
.send_message(msg.chat.id, "Send new master password")
.await?;
dialogue
.update(State::GetPassword(Handler::new(get_master_pass, previous)))
.update(State::GetNewMasterPass(Handler::new(
get_master_pass,
previous,
)))
.await?;
Ok(())
}