mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
#277: Get default parse mode from context in chat.get_mention()
This commit is contained in:
parent
59e6fd20c2
commit
5e3df8bfec
1 changed files with 3 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue