Add Message::video_chat_participants_invited

This commit is contained in:
Maybe Waffle 2023-02-13 14:10:14 +04:00
parent a411bff31c
commit 16c20e371c

View file

@ -615,7 +615,7 @@ mod getters {
MessageGroupChatCreated, MessageInvoice, MessageLeftChatMember, MessageNewChatMembers,
MessageNewChatPhoto, MessageNewChatTitle, MessagePassportData, MessagePinned,
MessageProximityAlertTriggered, MessageSuccessfulPayment, MessageSupergroupChatCreated,
PhotoSize, True, User,
MessageVideoChatParticipantsInvited, PhotoSize, True, User,
};
/// Getters for [Message] fields from [telegram docs].
@ -1178,6 +1178,18 @@ mod getters {
}
}
#[must_use]
pub fn video_chat_participants_invited(
&self,
) -> Option<&types::VideoChatParticipantsInvited> {
match &self.kind {
VideoChatParticipantsInvited(MessageVideoChatParticipantsInvited {
video_chat_participants_invited,
}) => Some(video_chat_participants_invited),
_ => None,
}
}
#[must_use]
pub fn reply_markup(&self) -> Option<&types::InlineKeyboardMarkup> {
match &self.kind {