logging confirmation links for debug purposes

This commit is contained in:
b3yond 2018-09-09 14:57:40 +02:00
parent 185014a452
commit 40c834020a
2 changed files with 7 additions and 7 deletions

View file

@ -16,17 +16,17 @@ class TelegramBot(Bot):
if update.message.text.lower() == "/start":
user.add_telegram_subscribers(update.message.sender.id)
tb.send_message(update.message.sender.id, "You are now \
subscribed to report notifications.")
subscribed to report notifications.")
#TODO: /start message should be set in frontend
elif update.message.text.lower() == "/stop":
user.remove_telegram_subscribers(update.message.sender.id)
tb.send_message(update.message.sender.id, "You are now \
unsubscribed from report notifications.")
unsubscribed from report notifications.")
#TODO: /stop message should be set in frontend
elif update.message.text.lower() == "/help":
tb.send_message(update.message.sender.id, "Send reports here to \
share them with other users. Use /start and /stop to \
be included/excluded.")
be included/excluded.")
#TODO: /help message should be set in frontend
else:
reports.append(Report(update.message.sender.username, self,

View file

@ -39,13 +39,13 @@ def register_post():
return dict(error='Email address already in use.')
# send confirmation mail
try:
print(url('confirm/' + city + '/%s' % db.user_token(email, password))) # only for local testing
link = url('confirm/' + city + '/%s' % db.user_token(email, password))
print(link) # only for local testing
logger.info('confirmation link to ' + email + ": " + link)
sendmail(
email,
"Confirm your account",
"Complete your registration here: %s" % (
url('confirm/' + city + '/%s' % db.user_token(email, password))
)
"Complete your registration here: %s" % (link)
)
return dict(info='Confirmation mail sent.')
except Exception: