Skip to content

Commit

Permalink
Add get chat from PollAnswer
Browse files Browse the repository at this point in the history
  • Loading branch information
Desiders committed Apr 28, 2024
1 parent 057cd88 commit ba56700
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions telers/src/types/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ impl Kind {
Kind::Message(message)
| Kind::EditedMessage(message)
| Kind::BusinessMessage(message)
| Kind::EditedBusinessMessage(message)
| Kind::ChannelPost(message)
| Kind::EditedChannelPost(message) => message.from(),
| Kind::EditedBusinessMessage(message) => message.from(),
Kind::InlineQuery(InlineQuery { from, .. })
| Kind::ChosenInlineResult(ChosenInlineResult { from, .. })
| Kind::CallbackQuery(CallbackQuery { from, .. })
Expand All @@ -184,7 +182,9 @@ impl Kind {
Kind::Poll(_)
| Kind::MessageReactionCount(_)
| Kind::RemovedChatBoost(_)
| Kind::DeletedBusinessMessages(_) => None,
| Kind::DeletedBusinessMessages(_)
| Kind::ChannelPost(_)
| Kind::EditedChannelPost(_) => None,
}
}

Expand Down Expand Up @@ -225,12 +225,12 @@ impl Kind {
| Kind::ChatBoost(ChatBoostUpdated { chat, .. })
| Kind::RemovedChatBoost(ChatBoostRemoved { chat, .. })
| Kind::DeletedBusinessMessages(BusinessMessagesDeleted { chat, .. }) => Some(chat),
Kind::PollAnswer(PollAnswer { voter_chat, .. }) => voter_chat.as_ref(),
Kind::MessageReaction(MessageReactionUpdated { actor_chat, .. }) => actor_chat.as_ref(),
Kind::InlineQuery(_)
| Kind::ChosenInlineResult(_)
| Kind::ShippingQuery(_)
| Kind::PreCheckoutQuery(_)
| Kind::PollAnswer(_)
| Kind::Poll(_)
| Kind::BusinessConnection(_) => None,
}
Expand Down

0 comments on commit ba56700

Please sign in to comment.