lib/telegram/bot/updates_controller/log_subscriber.rb in telegram-bot-0.16.1 vs lib/telegram/bot/updates_controller/log_subscriber.rb in telegram-bot-0.16.3

- old
+ new

@@ -1,24 +1,26 @@ +# frozen_string_literal: true + require 'active_support/log_subscriber' module Telegram module Bot class UpdatesController class LogSubscriber < ActiveSupport::LogSubscriber def start_processing(event) info do payload = event.payload "Processing by #{payload[:controller]}##{payload[:action]}\n" \ - " Update: #{payload[:update].to_json}" + " Update: #{payload[:update].to_json}" end end def process_action(event) info do payload = event.payload additions = UpdatesController.log_process_action(payload) message = "Completed in #{event.duration.round}ms" - message << " (#{additions.join(' | ')})" if additions.present? + message += " (#{additions.join(' | ')})" if additions.present? message end end def respond_with(event)