Skip to content

Commit

Permalink
Add pre_checkout_query to PAYLOAD_TYPES
Browse files Browse the repository at this point in the history
- Added pre_checkout_query to updates_controller.rb
- Updated tests in updates_controller_spec.rb
- Updated tests in typed_update_spec.rb
- Updated CHANGELOG.md for Bot API 7.7 and pre_checkout_query
  • Loading branch information
anko20094 committed Jul 13, 2024
1 parent f1025c7 commit 878336a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Unreleased

- Update to Bot API 7.7
- Added `pre_checkout_query` to PAYLOAD_TYPES

# 0.16.2

- Update to Bot API 7.3
Expand Down
1 change: 1 addition & 0 deletions lib/telegram/bot/updates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class UpdatesController < AbstractController::Base # rubocop:disable Metrics/Cla
chat_join_request
chat_boost
removed_chat_boost
pre_checkout_query
].freeze)

class << self
Expand Down
1 change: 1 addition & 0 deletions spec/telegram/bot/updates_controller/typed_update_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
message_reaction_count
chat_boost
removed_chat_boost
pre_checkout_query
]).
map { |x| [x, Telegram::Bot::Types.const_get(x.camelize)] }.to_h.
merge(
Expand Down
1 change: 1 addition & 0 deletions spec/telegram/bot/updates_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def stub_payload(*fields)
callback_query
poll_answer
chat_join_request
pre_checkout_query
]
(described_class::PAYLOAD_TYPES - custom_payload_types).each do |type|
context "when payload is #{type}" do
Expand Down

0 comments on commit 878336a

Please sign in to comment.