Skip to content

Commit

Permalink
Fix Telegram message encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkykh committed Jul 10, 2018
1 parent 774143d commit 006cfc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion medusa/notifiers/telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _send_telegram_msg(self, title, msg, user_id=None, api_key=None):

log.debug('Telegram in use with API KEY: {0}', api_key)

message = '%s : %s' % (title.encode(), msg.encode())
message = '{0} : {1}'.format(title, msg).encode('utf-8')
payload = urlencode({'chat_id': user_id, 'text': message})
telegram_api = 'https://api.telegram.org/bot%s/%s'

Expand Down

0 comments on commit 006cfc7

Please sign in to comment.