diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py index 36ba60b9..24a55b7c 100644 --- a/pyrogram/__init__.py +++ b/pyrogram/__init__.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . -__version__ = "2.0.146" +__version__ = "2.0.147" __license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)" __copyright__ = "Copyright (C) 2017-present Dan " diff --git a/pyrogram/methods/chats/get_forum_topics_by_id.py b/pyrogram/methods/chats/get_forum_topics_by_id.py index 8a994ed9..33b03158 100644 --- a/pyrogram/methods/chats/get_forum_topics_by_id.py +++ b/pyrogram/methods/chats/get_forum_topics_by_id.py @@ -101,4 +101,4 @@ async def get_forum_topics_by_id( chats=chats )) - return topics if is_iterable else topics[0] if topics else None + return topics_list if is_iterable else topics_list[0] if topics_list else None diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index f5d85070..5bec9bbb 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -1217,8 +1217,8 @@ async def _parse( @property def link(self) -> str: if ( - self.chat.type in (enums.ChatType.GROUP, enums.ChatType.SUPERGROUP, enums.ChatType.CHANNEL) - or self.chat.username + (self.chat.type in (enums.ChatType.GROUP, enums.ChatType.SUPERGROUP, enums.ChatType.CHANNEL) and + self.chat.username) or self.chat.username ): return f"https://t.me/{self.chat.username}/{self.id}" else: