telegram-bot 0.16.6 → 0.16.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3042f396a1305e21433237a6818cc0e107f729346473b7a995dde67ed13a195
4
- data.tar.gz: 1352209b4426de4d58b9f794ca5e9be379a585a103be2d2327da621b9d1a4105
3
+ metadata.gz: 34995d74c520f8eae70916aeb0275f4a497efb3acdbd646deff9a3f958a68091
4
+ data.tar.gz: 9435155f30d6b38fd104014186724882800dd427d50511bb8ad6918da061a278
5
5
  SHA512:
6
- metadata.gz: 302326bdcfbc79773c29d3c2cc07db1cbcfeee64907fa8f326e511f45095a52ac4119467f5d931bcbf7f869730882070238675da29f552c9fa1f7dd08c4b16eb
7
- data.tar.gz: 0d1d00a26453f03b77d27687b521450774ea2ae383384203ba14451cde1d1aa10dde46e3e0ad705043fa09d0d4fdf2a22dd617d9baf1fb0c12b0b00e7d9cdc72
6
+ metadata.gz: 34010573106a018e76e7818206b5105a87df55fb3e937a7d1ddae9e6a25a21ed542a30bf06b9e808dccb21c2bb99f5ef07e4aff5e2666baad416836e29b07755
7
+ data.tar.gz: 830516cb35cf2779bff8b8538d2bc9c9e481ce43437f5b32c4be6ac56eea55382354a98983be3aab12987868197e3a2eb66040a5e69d224f8dcabdc2e9c8d07b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Unreleased
2
2
 
3
+ # 0.16.7
4
+
5
+ - Update to Bot API 8.2
6
+
3
7
  # 0.16.6
4
8
 
5
9
  - Fix poller rake task for Rails 8.0
@@ -41,3 +41,24 @@ puts result_txt
41
41
  API_METHODS_FILE = File.expand_path('../lib/telegram/bot/client/api_methods.txt', __dir__).freeze
42
42
  File.write(API_METHODS_FILE, result_txt)
43
43
  puts '', "Updated #{API_METHODS_FILE}"
44
+
45
+
46
+ puts '', 'Payload types:'
47
+ update_tbody = doc.css('tbody').
48
+ find { |tbody| tbody.css('td').any? { |td| td.text == 'update_id' } }
49
+ payload_types = update_tbody.css('td:first-child').map(&:text).reject { |x| x == 'update_id' }
50
+
51
+ result = ['# Generated with bin/fetch-telegram-methods']
52
+ result << "# #{api_version[1]}" if api_version
53
+ result << payload_types.join("\n")
54
+ result << ''
55
+ result_txt = result.join("\n")
56
+
57
+ puts result_txt
58
+
59
+ PAYLOAD_TYPES_FILE = File.expand_path(
60
+ '../lib/telegram/bot/updates_controller/payload_types.txt',
61
+ __dir__,
62
+ ).freeze
63
+ File.write(PAYLOAD_TYPES_FILE, result_txt)
64
+ puts '', "Updated #{PAYLOAD_TYPES_FILE}"
@@ -1,5 +1,5 @@
1
1
  # Generated with bin/fetch-telegram-methods
2
- # Bot API 8.0
2
+ # Bot API 8.2
3
3
 
4
4
  getUpdates
5
5
  setWebhook
@@ -121,6 +121,10 @@ setCustomEmojiStickerSetThumbnail
121
121
  deleteStickerSet
122
122
  getAvailableGifts
123
123
  sendGift
124
+ verifyUser
125
+ verifyChat
126
+ removeUserVerification
127
+ removeChatVerification
124
128
 
125
129
  answerInlineQuery
126
130
  answerWebAppQuery
@@ -0,0 +1,25 @@
1
+ # Generated with bin/fetch-telegram-methods
2
+ # Bot API 8.2
3
+ message
4
+ edited_message
5
+ channel_post
6
+ edited_channel_post
7
+ business_connection
8
+ business_message
9
+ edited_business_message
10
+ deleted_business_messages
11
+ message_reaction
12
+ message_reaction_count
13
+ inline_query
14
+ chosen_inline_result
15
+ callback_query
16
+ shipping_query
17
+ pre_checkout_query
18
+ purchased_paid_media
19
+ poll
20
+ poll_answer
21
+ my_chat_member
22
+ chat_member
23
+ chat_join_request
24
+ chat_boost
25
+ removed_chat_boost
@@ -89,31 +89,13 @@ module Telegram
89
89
 
90
90
  extend Session::ConfigMethods
91
91
 
92
- PAYLOAD_TYPES = Set.new(%w[
93
- message
94
- edited_message
95
- channel_post
96
- edited_channel_post
97
- business_connection
98
- business_message
99
- edited_business_message
100
- deleted_business_messages
101
- message_reaction
102
- message_reaction_count
103
- inline_query
104
- chosen_inline_result
105
- callback_query
106
- shipping_query
107
- pre_checkout_query
108
- purchased_paid_media
109
- poll
110
- poll_answer
111
- my_chat_member
112
- chat_member
113
- chat_join_request
114
- chat_boost
115
- removed_chat_boost
116
- ].freeze)
92
+ PAYLOAD_TYPES_FILE = File.expand_path('updates_controller/payload_types.txt', __dir__)
93
+ PAYLOAD_TYPES = File.read(PAYLOAD_TYPES_FILE).
94
+ lines.
95
+ map(&:strip).
96
+ reject { |x| x.empty? || x.start_with?('#') }.
97
+ to_set.
98
+ freeze
117
99
 
118
100
  class << self
119
101
  # Initialize controller and process update.
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Telegram
4
4
  module Bot
5
- VERSION = '0.16.6'
5
+ VERSION = '0.16.7'
6
6
 
7
7
  def self.gem_version
8
8
  Gem::Version.new VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram-bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.6
4
+ version: 0.16.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Melentiev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-03 00:00:00.000000000 Z
11
+ date: 2025-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -152,6 +152,7 @@ files:
152
152
  - lib/telegram/bot/updates_controller/instrumentation.rb
153
153
  - lib/telegram/bot/updates_controller/log_subscriber.rb
154
154
  - lib/telegram/bot/updates_controller/message_context.rb
155
+ - lib/telegram/bot/updates_controller/payload_types.txt
155
156
  - lib/telegram/bot/updates_controller/reply_helpers.rb
156
157
  - lib/telegram/bot/updates_controller/rescue.rb
157
158
  - lib/telegram/bot/updates_controller/rspec_helpers.rb