Add the field via_chat_folder_invite_link to the ChatMemberUpdated

This commit is contained in:
Сырцев Вадим Игоревич 2024-06-15 15:05:44 +03:00
parent 266dd11ec1
commit aa6d659268

View file

@ -3,6 +3,9 @@ use serde::{Deserialize, Serialize};
use crate::types::{Chat, ChatInviteLink, ChatMember, User}; use crate::types::{Chat, ChatInviteLink, ChatMember, User};
/// This object represents changes in the status of a chat member.
///
/// [The official docs](https://core.telegram.org/bots/api#chatmemberupdated).
#[serde_with_macros::skip_serializing_none] #[serde_with_macros::skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ChatMemberUpdated { pub struct ChatMemberUpdated {
@ -20,6 +23,9 @@ pub struct ChatMemberUpdated {
/// Chat invite link, which was used by the user to join the chat; for /// Chat invite link, which was used by the user to join the chat; for
/// joining by invite link events only. /// joining by invite link events only.
pub invite_link: Option<ChatInviteLink>, pub invite_link: Option<ChatInviteLink>,
#[serde(default)]
/// True, if the user joined the chat via a chat folder invite link
pub via_chat_folder_invite_link: bool,
} }
impl ChatMemberUpdated { impl ChatMemberUpdated {