Compare commits

...

2 commits

Author SHA1 Message Date
Alexey Skobkin 3bffd32df0 #7 Notifier now sends messages in HTML.
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
2022-05-30 22:58:50 +03:00
Alexey Skobkin a6aa04b2ca #7 Removing trailing space. 2022-05-30 22:58:19 +03:00

View file

@ -33,7 +33,7 @@ class CommandProcessor:
self.bot.reply_to(
message,
'Supported commands:\n'
' /add <feed url> - Add new feed\n '
' /add <feed url> - Add new feed\n'
' /list - List currently added feeds\n'
' /del <feed url> - Remove feed\n'
' /help - Get this help message'
@ -100,13 +100,13 @@ class Notifier:
self.bot.send_message(
chat_id=telegram_id,
text=self.__format_message(update),
parse_mode='MarkdownV2'
parse_mode='HTML'
)
@staticmethod
def __format_message(item: FeedItem) -> str:
return (
f"**[{item.title}]({item.url})**\n\n"
f"<strong><a href=\"{item.url}\">{item.title}</a></strong>\n\n"
f"{item.description}"
)