better handling of text variable

This commit is contained in:
Chris Caron 2019-03-17 15:44:08 -04:00
parent b2d5c9ae09
commit 6a8099c6f7

View File

@ -373,9 +373,6 @@ class NotifyTelegram(NotifyBase):
# HTML
body = NotifyBase.escape_html(body, whitespace=False)
# Assign the body
payload['text'] = body
if title and self.notify_format == NotifyFormat.TEXT:
# Text HTML Formatting
payload['text'] = '<b>%s</b>\r\n%s' % (
@ -391,6 +388,10 @@ class NotifyTelegram(NotifyBase):
body,
)
else:
# Assign the body
payload['text'] = body
# Create a copy of the chat_ids list
chat_ids = list(self.chat_ids)
while len(chat_ids):