Skip to content

Commit

Permalink
Fix message.link issue.
Browse files Browse the repository at this point in the history
Fix topics issues.

Signed-off-by: Aliwoto <[email protected]>
  • Loading branch information
ALiwoto committed Jun 14, 2024
1 parent 9f9d57f commit cb07c01
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyrogram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.

__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 <https://github.com/delivrance>"

Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/chats/get_forum_topics_by_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions pyrogram/types/messages_and_media/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cb07c01

Please sign in to comment.