mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 06:25:10 +01:00
Add business conn. related fields to Message
Added `sender_business_bot` and `business_connection_id` fields
This commit is contained in:
parent
941d1eb82a
commit
1a5eca0a75
2 changed files with 17 additions and 0 deletions
|
@ -54,6 +54,17 @@ pub struct Message {
|
|||
/// Bot through which the message was sent.
|
||||
pub via_bot: Option<User>,
|
||||
|
||||
/// The bot that actually sent the message on behalf of the business
|
||||
/// account. Available only for outgoing messages sent on behalf of the
|
||||
/// connected business account.
|
||||
pub sender_business_bot: Option<User>,
|
||||
|
||||
/// Unique identifier of the business connection from which the message was
|
||||
/// received. If non-empty, the message belongs to a chat of the
|
||||
/// corresponding business account that is independent from any potential
|
||||
/// bot chat which might share the same identifier.
|
||||
pub business_connection_id: Option<String>,
|
||||
|
||||
#[serde(flatten)]
|
||||
pub kind: MessageKind,
|
||||
}
|
||||
|
@ -1902,6 +1913,8 @@ mod tests {
|
|||
has_hidden_members: false,
|
||||
chat_full_info: ChatFullInfo::default()
|
||||
},
|
||||
sender_business_bot: None,
|
||||
business_connection_id: None,
|
||||
kind: MessageKind::ChatShared(MessageChatShared {
|
||||
chat_shared: ChatShared {
|
||||
request_id: RequestId(348349),
|
||||
|
@ -2573,6 +2586,8 @@ mod tests {
|
|||
chat_full_info: ChatFullInfo::default()
|
||||
},
|
||||
via_bot: None,
|
||||
sender_business_bot: None,
|
||||
business_connection_id: None,
|
||||
kind: MessageKind::Giveaway(MessageGiveaway {
|
||||
giveaway: Giveaway {
|
||||
chats: vec![Chat {
|
||||
|
|
|
@ -546,6 +546,8 @@ mod test {
|
|||
has_aggressive_anti_spam_enabled: false,
|
||||
chat_full_info: ChatFullInfo::default(),
|
||||
},
|
||||
sender_business_bot: None,
|
||||
business_connection_id: None,
|
||||
kind: MessageKind::Common(MessageCommon {
|
||||
reply_to_message: None,
|
||||
forward_origin: None,
|
||||
|
|
Loading…
Reference in a new issue