From 7d1c8c42d3cdd333e3a2933eb09fcd9523810852 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 13 Sep 2020 22:27:50 +0300 Subject: [PATCH] Fix syntax error --- aiogram/types/message.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aiogram/types/message.py b/aiogram/types/message.py index f867a44a..9d2ad505 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -245,8 +245,8 @@ class Message(base.TelegramObject): :return: str """ - if self.chat.type == ChatType.PRIVATE: - raise TypeError('Invalid chat type + if ChatType.is_private(self.chat): + raise TypeError("Invalid chat type!") url = "https://t.me/" if self.chat.username: # Generates public link