From 0d9afe8b6660962f04995bf396826bf8d31bbc5a Mon Sep 17 00:00:00 2001 From: Maki Date: Mon, 22 Jun 2020 09:17:09 -0700 Subject: [PATCH] Devuelve url para vincular lumi con telegram --- app/controllers/telegram/webhook_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/telegram/webhook_controller.rb b/app/controllers/telegram/webhook_controller.rb index f200659..b30753e 100644 --- a/app/controllers/telegram/webhook_controller.rb +++ b/app/controllers/telegram/webhook_controller.rb @@ -15,7 +15,7 @@ module Telegram # Recibe un token, lo busca y asocia las cuentas def start!(token = nil) unless token - respond_with :message, text: t('.need_token') + respond_with :message, text: t('.need_token', token_link: vincular_a_telegram_url) return end @@ -28,5 +28,9 @@ module Telegram respond_with :message, text: t('.hi', pirata: pirata.nick) end + private + def vincular_a_telegram_url + 'https://#{ENV.fetch('APP_HOST', 'lumi.partidopirata.com.ar')}/#/vincularATelegram' + end end end