diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 7f083119..d0aed602 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -267,7 +267,8 @@ class Message(base.TelegramObject): :return: str """ - if ChatType.is_private(self.chat): + + if self.chat.type == ChatType.PRIVATE: raise TypeError("Invalid chat type!") url = "https://t.me/" if self.chat.username: