mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
fix
This commit is contained in:
parent
17a26aec7b
commit
1ea9d9d198
1 changed files with 11 additions and 7 deletions
|
@ -6,10 +6,14 @@ use crate::core::network;
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
/// Use this method to forward messages of any kind. On success, the sent
|
/// Use this method to forward messages of any kind. On success, the sent
|
||||||
/// [Message]: crate::core::types::message::Message is returned.
|
/// [Message]: crate::core::types::message::Message is returned.
|
||||||
struct ForwardMessage<'a> {
|
pub struct ForwardMessage<'a> {
|
||||||
info: RequestContext<'a>,
|
ctx: RequestContext<'a>,
|
||||||
|
|
||||||
|
/// Unique identifier for the target chat or username of the target channel
|
||||||
|
/// (in the format @channelusername)
|
||||||
pub chat_id: ChatId,
|
pub chat_id: ChatId,
|
||||||
|
/// Unique identifier for the target chat or username of the target channel
|
||||||
|
/// (in the format @channelusername)
|
||||||
pub from_chat_id: ChatId,
|
pub from_chat_id: ChatId,
|
||||||
/// Message identifier in the chat specified in from_chat_id
|
/// Message identifier in the chat specified in from_chat_id
|
||||||
pub message_id: i64,
|
pub message_id: i64,
|
||||||
|
@ -34,9 +38,9 @@ impl<'a> Request<'a> for ForwardMessage<'a> {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
network::request(
|
network::request(
|
||||||
&self.info.client,
|
&self.ctx.client,
|
||||||
&self.info.token,
|
&self.ctx.token,
|
||||||
"ForwardMessage",
|
"forwardMessage",
|
||||||
Some(params),
|
Some(params),
|
||||||
).await
|
).await
|
||||||
})
|
})
|
||||||
|
@ -44,12 +48,12 @@ impl<'a> Request<'a> for ForwardMessage<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> ForwardMessage<'a> {
|
impl<'a> ForwardMessage<'a> {
|
||||||
pub(crate) fn new(info: RequestContext<'a>,
|
pub(crate) fn new(ctx: RequestContext<'a>,
|
||||||
chat_id: ChatId,
|
chat_id: ChatId,
|
||||||
from_chat_id: ChatId,
|
from_chat_id: ChatId,
|
||||||
message_id: i64) -> Self {
|
message_id: i64) -> Self {
|
||||||
Self {
|
Self {
|
||||||
info,
|
ctx,
|
||||||
chat_id,
|
chat_id,
|
||||||
from_chat_id,
|
from_chat_id,
|
||||||
message_id,
|
message_id,
|
||||||
|
|
Loading…
Reference in a new issue