mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Fix cached message sending
This commit is contained in:
@@ -53,13 +53,13 @@ async fn _send_cached(
|
|||||||
match bot
|
match bot
|
||||||
.copy_message(
|
.copy_message(
|
||||||
message.chat.id,
|
message.chat.id,
|
||||||
Recipient::Id(ChatId(cached_message.chat_id)),
|
Recipient::Id(ChatId(cached_message.data.chat_id)),
|
||||||
cached_message.message_id,
|
cached_message.data.message_id,
|
||||||
)
|
)
|
||||||
.send()
|
.send()
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
Ok(_) => todo!(),
|
Ok(_) => Ok(()),
|
||||||
Err(err) => Err(Box::new(err)),
|
Err(err) => Err(Box::new(err)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Deserialize, Debug, Clone)]
|
||||||
|
pub struct CachedMessageData {
|
||||||
|
pub message_id: i32,
|
||||||
|
pub chat_id: i64,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug, Clone)]
|
#[derive(Deserialize, Debug, Clone)]
|
||||||
pub struct CachedMessage {
|
pub struct CachedMessage {
|
||||||
pub message_id: i32,
|
pub data: CachedMessageData,
|
||||||
pub chat_id: i64,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct DownloadFile {
|
pub struct DownloadFile {
|
||||||
|
|||||||
Reference in New Issue
Block a user