#7 Notifier now sends messages in HTML.
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing

This commit is contained in:
Alexey Skobkin 2022-05-30 22:58:50 +03:00
parent a6aa04b2ca
commit 3bffd32df0

View file

@ -100,13 +100,13 @@ class Notifier:
self.bot.send_message( self.bot.send_message(
chat_id=telegram_id, chat_id=telegram_id,
text=self.__format_message(update), text=self.__format_message(update),
parse_mode='MarkdownV2' parse_mode='HTML'
) )
@staticmethod @staticmethod
def __format_message(item: FeedItem) -> str: def __format_message(item: FeedItem) -> str:
return ( return (
f"**[{item.title}]({item.url})**\n\n" f"<strong><a href=\"{item.url}\">{item.title}</a></strong>\n\n"
f"{item.description}" f"{item.description}"
) )