Add setters to MessageMigrate

This commit is contained in:
Temirkhan Myrzamadi 2020-07-28 01:41:25 +06:00
parent 9ec475a69c
commit f5b81e87b4

View file

@ -307,6 +307,22 @@ pub struct MessageMigrate {
pub migrate_from_chat_id: i64,
}
impl MessageMigrate {
pub fn new(migrate_to_chat_id: i64, migrate_from_chat_id: i64) -> Self {
Self { migrate_to_chat_id, migrate_from_chat_id }
}
pub fn migrate_to_chat_id(mut self, val: i64) -> Self {
self.migrate_to_chat_id = val;
self
}
pub fn migrate_from_chat_id(mut self, val: i64) -> Self {
self.migrate_from_chat_id = val;
self
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct MessagePinned {