Add setters to ForwardOrigin

This commit is contained in:
Temirkhan Myrzamadi 2020-07-28 02:19:38 +06:00
parent 3c3a0aa474
commit baf46bbc8a

View file

@ -521,12 +521,23 @@ impl ForwardNonChannel {
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct ForwardOrigin {
pub reply_to_message: Option<Box<Message>>,
}
impl ForwardOrigin {
pub fn new() -> Self {
Self::default()
}
pub fn reply_to_message(mut self, val: Message) -> Self {
self.reply_to_message = Some(Box::new(val));
self
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
#[non_exhaustive]