lib/telegram/bot/routes_helper.rb
def telegram_webhook(controller, bot = :default, **options)
        bot = Client.wrap(bot)
        params = {
          to: Middleware.new(bot, controller),
          as: RoutesHelper.route_name_for_bot(bot),
          format: false,
        }.merge!(options)
        post("telegram/#{RoutesHelper.escape_token bot.token}", params)
        UpdatesPoller.add(bot, controller) if Telegram.bot_poller_mode?
      end
# Define route which processes requests using given controller and bot.
#
#   telegram_webhook TelegramController, bot
#
#   telegram_webhook TelegramController
#   # same as:
#   telegram_webhook TelegramController, :default
#
#   # pass additional options
#   telegram_webhook TelegramController, :default, as: :custom_route_name
Define route which processes requests using given controller and bot.




Define route which processes requests using given controller and bot .
def telegram_webhook(controller, bot = :default, **options)
        bot = Client.wrap(bot)
        params = {
          to: Middleware.new(bot, controller),
          as: RoutesHelper.route_name_for_bot(bot),
          format: false,
        }.merge!(options)
        post("telegram/#{RoutesHelper.escape_token bot.token}", params)
        UpdatesPoller.add(bot, controller) if Telegram.bot_poller_mode?
      end
def telegram_webhook ( controller , bot = :default , ** options ) bot = Client . wrap ( bot ) params = { to : Middleware . new ( bot , controller ) , as : RoutesHelper . route_name_for_bot ( bot ) , format : false , } . merge! ( options ) post ( "telegram/#{RoutesHelper.escape_token bot.token}" , params ) UpdatesPoller . add ( bot , controller ) if Telegram . bot_poller_mode? end
Define route which processes requests using given controller and bot.
Define route which processes requests using given controller and bot .
controller
bot
options