This commit is contained in:
2024-05-06 22:53:05 +02:00
parent 18c49d42d4
commit 5ce9ffd6ff
4 changed files with 7 additions and 8 deletions

1
Cargo.lock generated
View File

@@ -1911,6 +1911,7 @@ dependencies = [
"once_cell",
"reqwest 0.11.23",
"sentry",
"sentry-tracing",
"serde",
"serde_json",
"teloxide",

View File

@@ -13,9 +13,10 @@ axum_typed_multipart = "0.11.1"
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"]}
tower-http = { version = "0.5.2", features = ["trace"] }
sentry-tracing = "0.32.3"
tokio = "1.37.0"
tokio-util = { version = "0.7.11", features = [ "full" ] }
tokio-util = { version = "0.7.11", features = [ "full" ] }
axum-prometheus = "0.6.1"
futures = "0.3.30"

View File

@@ -68,10 +68,6 @@ pub async fn download_file(chat_id: i64, message_id: i32) -> Option<BotDownloade
match result {
Ok(message) => {
if message.document() == None {
return None;
}
let file_id = match message.document() {
Some(v) => v.file.id.clone(),
None => {

View File

@@ -3,6 +3,7 @@ mod core;
use std::{net::SocketAddr, str::FromStr};
use sentry::{integrations::debug_images::DebugImagesIntegration, types::Dsn, ClientOptions};
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
use crate::core::views::get_router;
@@ -20,9 +21,9 @@ async fn main() {
let _guard = sentry::init(options);
tracing_subscriber::fmt()
.with_target(false)
.compact()
tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer())
.with(sentry_tracing::layer())
.init();
let addr = SocketAddr::from(([0, 0, 0, 0], 8080));