Merge branch 'token' into 'master'

Token

See merge request pip/miniloom/api!1
This commit is contained in:
fauno 2020-06-22 10:50:15 -07:00
commit 726748600b
4 changed files with 8 additions and 3 deletions

View file

@ -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

View file

@ -49,7 +49,7 @@ en:
telegram:
webhook:
start:
need_token: 'To be able to link your Lumi and Telegram accounts, you can go to Lumi and find a link to Telegram. Once you open it I can link them P)'
need_token: 'To link your Lumi and Telegram accounts, click here: %{token_link}'
couldnt_find: "I couldn't find you, did you use the correct link?"
hi: "Hi %{pirata}! I linked your accounts, from now on I'll contact you whenever there's news"
message:

View file

@ -55,7 +55,7 @@ es:
telegram:
webhook:
start:
need_token: 'Para poder asociar tus cuentas entre Lumi y Telegram, podés ir a Lumi y buscar el vínculo a Telegram. Al abrirlo se asocian las cuentas P)'
need_token: 'Para poder asociar tus cuentas entre Lumi y Telegram, seguí este link: %{token_link}'
couldnt_find: 'No te encuentro, ¿usaste el vínculo correcto?'
hi: '¡Hola %{pirata}! Ya asocié tus cuentas de Lumi y Telegram, a partir de ahora te voy a contactar con las actualizaciones P)'
message:

View file

@ -4,6 +4,7 @@ PORT=3000
RAILS_ENV="development"
WEB_CONCURRENCY=2
API_HOST="api.lumi.partidopirata.com.ar"
APP_HOST="lumi.partidopirata.com.ar"
RAILS_MASTER_KEY=
RAILS_SERVE_STATIC_FILES=true
RAILS_LOG_TO_STDOUT=true