mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-30 13:57:54 +00:00
Fix invited_by being optional
This commit is contained in:
@@ -151,7 +151,10 @@ class ChatMember(Object):
|
|||||||
user=types.User._parse(client, users[member.user_id]),
|
user=types.User._parse(client, users[member.user_id]),
|
||||||
joined_date=utils.timestamp_to_datetime(member.date),
|
joined_date=utils.timestamp_to_datetime(member.date),
|
||||||
promoted_by=types.User._parse(client, users[member.promoted_by]),
|
promoted_by=types.User._parse(client, users[member.promoted_by]),
|
||||||
invited_by=types.User._parse(client, users[member.inviter_id]),
|
invited_by=(
|
||||||
|
types.User._parse(client, users[member.inviter_id])
|
||||||
|
if member.inviter_id else None
|
||||||
|
),
|
||||||
custom_title=member.rank,
|
custom_title=member.rank,
|
||||||
can_be_edited=member.can_edit,
|
can_be_edited=member.can_edit,
|
||||||
privileges=types.ChatPrivileges._parse(member.admin_rights),
|
privileges=types.ChatPrivileges._parse(member.admin_rights),
|
||||||
|
Reference in New Issue
Block a user