1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-03 17:55:52 +03:00

Pass action parameter to RequestBodyFormatter

Этот коммит содержится в:
Max Melentiev
2022-03-13 21:39:55 +00:00
родитель 380f6686fc
Коммит 7d8a19d3c8
5 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@@ -37,7 +37,7 @@ module Telegram
end
def prepare_async_args(action, body = {})
[action.to_s, Async.prepare_hash(RequestBodyFormatter.format(body))]
[action.to_s, Async.prepare_hash(RequestBodyFormatter.format(body, action))]
end
def error_for_response(response)
@@ -63,7 +63,7 @@ module Telegram
end
def request(action, body = {})
response = http_request("#{base_uri}#{action}", RequestBodyFormatter.format(body))
response = http_request("#{base_uri}#{action}", RequestBodyFormatter.format(body, action))
raise self.class.error_for_response(response) if response.status >= 300
JSON.parse(response.body)
end

Просмотреть файл

@@ -1,6 +1,6 @@
module Telegram
module Bot
VERSION = '0.15.5'.freeze
VERSION = '0.15.6'.freeze
def self.gem_version
Gem::Version.new VERSION