Updated dependencies

This commit is contained in:
2025-08-17 17:10:04 +03:00
parent 0f2963b0cf
commit ea2401a486
6 changed files with 471 additions and 484 deletions

938
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@ derive_more = { version = "2", features = [
"from",
] }
dotenvy = "0.15"
foldhash = "0.1.4"
foldhash = "0.2"
futures = "0.3"
fuzzy-matcher = "0.3"
hex = "0.4"
@@ -49,7 +49,7 @@ sqlx = { version = "0.8", features = [
"migrate",
] }
subtle = "2"
teloxide = { version = "0.15", features = [
teloxide = { version = "0.17", features = [
"macros",
"ctrlc_handler",
"rustls",
@@ -62,7 +62,7 @@ tokio = { version = "1", features = [
"sync",
"parking_lot",
] }
toml = "0.8"
toml = "0.9"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = [
"parking_lot",

View File

@@ -6,13 +6,12 @@ pub async fn delete_message(
q: CallbackQuery,
locale: LocaleRef,
) -> crate::Result<()> {
if let Some(msg) = q.message {
if bot.delete_message(msg.chat().id, msg.id()).await.is_err() {
if let Some(msg) = q.message
&& bot.delete_message(msg.chat().id, msg.id()).await.is_err() {
bot.send_message(msg.chat().id, &locale.error_deleting_message)
.reply_markup(deletion_markup(locale))
.await?;
}
}
bot.answer_callback_query(q.id).await?;
Ok(())
}

View File

@@ -46,6 +46,6 @@ async fn notify_about_no_user_info(
}
/// Gets a handler that filters out the messages without user information
pub fn get_handler() -> Handler<'static, DependencyMap, crate::Result<()>, DpHandlerDescription> {
pub fn get_handler() -> Handler<'static, crate::Result<()>, DpHandlerDescription> {
dptree::filter(has_no_user_info).endpoint(notify_about_no_user_info)
}

View File

@@ -44,6 +44,6 @@ async fn notify_about_no_master_pass(
}
/// Gets a handler that filters out the messages of users that don't have a master password set
pub fn get_handler() -> Handler<'static, DependencyMap, crate::Result<()>, DpHandlerDescription> {
pub fn get_handler() -> Handler<'static, crate::Result<()>, DpHandlerDescription> {
dptree::filter_map_async(master_pass_exists).endpoint(notify_about_no_master_pass)
}

View File

@@ -49,7 +49,7 @@ fn validate_document(document: Option<&Document>) -> Result<&Document, InvalidDo
}
async fn download_file(bot: &Throttle<Bot>, file: &FileMeta) -> crate::Result<Box<[u8]>> {
let path = bot.get_file(&file.id).await?.path;
let path = bot.get_file(file.id.clone()).await?.path;
let mut data = Vec::with_capacity(file.size as usize);
let mut stream = bot.download_file_stream(&path);
while let Some(bytes) = stream.try_next().await? {