Skip to content

Commit 6621d1d

Browse files
fix: community_id parsing in Chat class
1 parent 4db60b4 commit 6621d1d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • pyrogram/types/user_and_chats

pyrogram/types/user_and_chats/chat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ def _parse_user_chat(
888888
profile_color=types.ChatColor._parse_profile_color(user.profile_color),
889889
paid_message_star_count=user.send_paid_messages_stars,
890890
can_manage_bots=user.bot_can_manage_bots,
891-
community_id=user.linked_community_id,
891+
community_id=utils.get_channel_id(user.linked_community_id) if user.linked_community_id is not None else None,
892892
raw=user,
893893
client=client,
894894
)
@@ -1005,7 +1005,7 @@ def _parse_channel_chat(
10051005
has_automatic_translation=channel.autotranslation,
10061006
has_forum_tabs=channel.forum_tabs,
10071007
has_direct_messages_group=channel.broadcast_messages_allowed,
1008-
community_id=channel.linked_community_id,
1008+
community_id=utils.get_channel_id(channel.linked_community_id) if channel.linked_community_id is not None else None,
10091009
raw=channel,
10101010
client=client,
10111011
)

0 commit comments

Comments
 (0)