Compare commits

...

2 commits

Author SHA1 Message Date
git-sid 428f42abea Add ping functionality to telegram bot.
TODO: add lag time to response
2019-02-14 09:49:18 +01:00
b3yond 02f117a864
Merge pull request #82 from ticketfrei/csrf
Building in CSRF prevention
2019-01-27 17:56:53 +01:00

View file

@ -50,6 +50,9 @@ class TelegramBot(Bot):
"Send reports here to share them with other users. " "Send reports here to share them with other users. "
"Use /start and /stop to get reports or not.") "Use /start and /stop to get reports or not.")
# TODO: /help message should be set in frontend # TODO: /help message should be set in frontend
elif update.message.text.lower() == "/ping":
tb.send_message(
update.message.sender.id, "pong")
else: else:
# set report.author to "" to avoid mailbot crash # set report.author to "" to avoid mailbot crash
sender_name = update.message.sender.username sender_name = update.message.sender.username