diff --git a/src/core/requests/edit_message_live_location.rs b/src/core/requests/edit_message_live_location.rs index a6208aee..e6003101 100644 --- a/src/core/requests/edit_message_live_location.rs +++ b/src/core/requests/edit_message_live_location.rs @@ -1,6 +1,6 @@ use serde::Serialize; use crate::core::requests::{RequestContext, ChatId, Request, RequestFuture, ResponseResult}; -use crate::core::types::Message; +use crate::core::types::{Message, ReplyMarkup}; use crate::core::network; #[derive(Debug, Clone, Serialize)] @@ -32,7 +32,7 @@ pub struct EditMessageLiveLocation<'a> { longitude: f64, #[serde(skip_serializing_if="Option::is_none")] /// A JSON-serialized object for a new inline keyboard. - reply_markup: Option<()> // TODO: add reply_markup + reply_markup: Option } impl<'a> Request<'a> for EditMessageLiveLocation<'a> { diff --git a/src/core/requests/send_audio.rs b/src/core/requests/send_audio.rs index 7951ec8e..26c9003b 100644 --- a/src/core/requests/send_audio.rs +++ b/src/core/requests/send_audio.rs @@ -2,7 +2,7 @@ use crate::core::{ network, requests::{ChatId, Request, RequestFuture, ResponseResult, RequestContext}, requests::form_builder::FormBuilder, - types::{InputFile, ParseMode, Message}, + types::{InputFile, ParseMode, Message, ReplyMarkup}, }; /// Use this method to send audio files, if you want Telegram clients to display @@ -54,7 +54,7 @@ pub struct SendAudio<'a> { pub disable_notification: Option, /// If the message is a reply, ID of the original message pub reply_to_message_id: Option, - pub reply_markup: Option<()> // TODO: add reply_markup + pub reply_markup: Option, } impl<'a> Request<'a> for SendAudio<'a> { diff --git a/src/core/requests/send_location.rs b/src/core/requests/send_location.rs index 132e1cee..48f2ff94 100644 --- a/src/core/requests/send_location.rs +++ b/src/core/requests/send_location.rs @@ -1,6 +1,6 @@ use crate::core::{ requests::{RequestContext, ChatId, Request, RequestFuture, ResponseResult}, - types::Message, + types::{Message, ReplyMarkup}, network, }; @@ -33,7 +33,7 @@ pub struct SendLocation<'a> { /// If the message is a reply, ID of the original message reply_to_message_id: Option, #[serde(skip_serializing_if="Option::is_none")] - reply_markup: Option<()>, + reply_markup: Option, } impl<'a> Request<'a> for SendLocation<'a> { diff --git a/src/core/requests/send_message.rs b/src/core/requests/send_message.rs index 55239f77..e0b5c5b1 100644 --- a/src/core/requests/send_message.rs +++ b/src/core/requests/send_message.rs @@ -1,7 +1,6 @@ use crate::core::{ network, - types::Message, - types::ParseMode, + types::{Message, ParseMode, ReplyMarkup}, requests::{ form_builder::FormBuilder, ChatId, @@ -45,7 +44,7 @@ pub struct SendMessage<'a> { #[serde(skip_serializing_if="Option::is_none")] pub reply_to_message_id: Option, #[serde(skip_serializing_if="Option::is_none")] - pub reply_markup: Option<()>, // TODO: ReplyMarkup enum + pub reply_markup: Option, } impl<'a> Request<'a> for SendMessage<'a> { @@ -111,7 +110,7 @@ impl<'a> SendMessage<'a> { self } - pub fn reply_markup>(mut self, val: T) -> Self { + pub fn reply_markup>(mut self, val: T) -> Self { self.reply_markup = Some(val.into()); self } diff --git a/src/core/requests/send_photo.rs b/src/core/requests/send_photo.rs index 948a44e4..cae3fa89 100644 --- a/src/core/requests/send_photo.rs +++ b/src/core/requests/send_photo.rs @@ -2,7 +2,7 @@ use std::path::Path; use crate::core::{ network, - types::{ParseMode, Message, InputFile}, + types::{ParseMode, Message, InputFile, ReplyMarkup}, requests::{ ChatId, Request, @@ -44,8 +44,7 @@ pub struct SendPhoto<'a> { pub disable_notification: Option, /// If the message is a reply, ID of the original message pub reply_to_message_id: Option, - - // TODO: add reply_markup + pub reply_markup: Option, } impl<'a> Request<'a> for SendPhoto<'a> { @@ -96,7 +95,8 @@ impl<'a> SendPhoto<'a> { caption: None, parse_mode: None, disable_notification: None, - reply_to_message_id: None + reply_to_message_id: None, + reply_markup: None } }