1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-03 17:55:52 +03:00
Этот коммит содержится в:
Max Melentiev
2016-02-29 14:06:11 +06:00
родитель 933bb337ef
Коммит c06ba2af5c
2 изменённых файлов: 10 добавлений и 3 удалений

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

@@ -12,9 +12,10 @@ namespace :telegram do
routes = Rails.application.routes.url_helpers
cert_file = ENV['CERT']
cert = File.open(cert_file) if cert_file
Telegram.bots.each_value do |bot|
route_name = Telegram::RoutesHelper.route_name_for_bot(bot)
Telegram.bots.each do |key, bot|
route_name = Telegram::Bot::RoutesHelper.route_name_for_bot(bot)
url = routes.send("#{route_name}_url")
puts "Setting webhook for #{key}..."
bot.set_webhook(url: url, certificate: cert)
end
end