Skip to content

Commit

Permalink
Merge pull request #13 from Desiders/get-char-from-poll-answer
Browse files Browse the repository at this point in the history
Add getting chat from `PollAnswer` message
  • Loading branch information
Desiders authored Apr 28, 2024
2 parents 057cd88 + ba56700 commit 33e974a
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 33e974a

Please sign in to comment.