From e6feadaf61690f153ca7e0f7be3ca332a8817177 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Wed, 9 Aug 2023 02:38:36 +0200 Subject: [PATCH] Fix --- src/bots/approved_bot/modules/download.rs | 4 ++-- src/bots/approved_bot/services/book_cache/types.rs | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/bots/approved_bot/modules/download.rs b/src/bots/approved_bot/modules/download.rs index 8d8d704..3d48899 100644 --- a/src/bots/approved_bot/modules/download.rs +++ b/src/bots/approved_bot/modules/download.rs @@ -239,8 +239,8 @@ async fn _send_cached( match bot .copy_message( message.chat.id, - Recipient::Id(ChatId(cached_message.data.chat_id)), - MessageId(cached_message.data.message_id), + Recipient::Id(ChatId(cached_message.chat_id)), + MessageId(cached_message.message_id), ) .send() .await diff --git a/src/bots/approved_bot/services/book_cache/types.rs b/src/bots/approved_bot/services/book_cache/types.rs index f455154..66ef3e5 100644 --- a/src/bots/approved_bot/services/book_cache/types.rs +++ b/src/bots/approved_bot/services/book_cache/types.rs @@ -2,16 +2,11 @@ use serde::Deserialize; #[derive(Deserialize, Debug, Clone)] -pub struct CachedMessageData { +pub struct CachedMessage { pub message_id: i32, pub chat_id: i64, } -#[derive(Deserialize, Debug, Clone)] -pub struct CachedMessage { - pub data: CachedMessageData, -} - pub struct DownloadFile { pub response: reqwest::Response, pub filename: String,