FIX:(#1637) Possible fix for telegram notifications not working on snatch/post-processing

This commit is contained in:
evilhero 2017-05-16 14:15:11 -04:00
parent 5ccd402460
commit 377c25f69b
1 changed files with 2 additions and 2 deletions

View File

@ -409,14 +409,14 @@ class TELEGRAM:
# Send message to user using Telegram's Bot API
try:
response = requests.post(self.TELEGRAM_API % (self.token, "sendMessage"), data=payload)
response = requests.post(self.TELEGRAM_API % (self.token, "sendMessage"), json=payload, verify=True)
except Exception, e:
logger.info(u'Telegram notify failed: ' + str(e))
# Error logging
sent_successfuly = True
if not response.status_code == 200:
logger.info(u'Could not send notification to TelegramBot (token=%s). Response: [%s]', (self.token, response.text))
logger.info(u'Could not send notification to TelegramBot (token=%s). Response: [%s]' % (self.token, response.text))
sent_successfuly = False
logger.info(u"Telegram notifications sent.")