lib/boppers/notifier/telegram.rb in boppers-0.0.6 vs lib/boppers/notifier/telegram.rb in boppers-0.0.7
- old
+ new
@@ -11,15 +11,15 @@
@api_token = api_token
@channel_id = channel_id
@subscribe = subscribe
end
- def call(_subject, message, _options)
+ def call(title, message, _options)
bot = TelegramBot.new(token: api_token)
notification = TelegramBot::OutMessage.new
notification.chat = TelegramBot::Channel.new(id: channel_id)
- notification.text = message
+ notification.text = "#{title}\n\n#{message}"
notification.send_with(bot)
end
end
end
end