#277: Get default parse mode from context in chat.get_mention()

This commit is contained in:
Alex Root Junior 2020-04-05 18:22:27 +03:00
parent 59e6fd20c2
commit 5e3df8bfec

View file

@ -77,6 +77,9 @@ class Chat(base.TelegramObject):
return shift - self.id
def get_mention(self, name=None, as_html=True) -> base.String:
if as_html is None and self.bot.parse_mode and self.bot.parse_mode.lower() == 'html':
as_html = True
if name is None:
name = self.mention
if as_html: