lib/telegram/bot/middleware.rb in telegram-bot-0.7.4 vs lib/telegram/bot/middleware.rb in telegram-bot-0.8.0

- old
+ new

@@ -1,8 +1,10 @@ require 'active_support/concern' +require 'active_support/core_ext/hash/indifferent_access' +require 'active_support/json' require 'action_dispatch/http/mime_type' -require 'action_dispatch/middleware/params_parser' +require 'action_dispatch/http/request' module Telegram module Bot class Middleware attr_reader :bot, :controller @@ -11,10 +13,11 @@ @bot = bot @controller = controller end def call(env) - update = env['action_dispatch.request.request_parameters'] + request = ActionDispatch::Request.new(env) + update = request.request_parameters controller.dispatch(bot, update) [200, {}, ['']] end def inspect