2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 05:18:10 +00:00

Fix "left" status not being parsed in ChatMember (#204)

This commit is contained in:
Dan 2019-01-21 15:36:54 +01:00
parent 8cfb6614d4
commit 76d4e4f60e

View File

@ -155,7 +155,11 @@ class ChatMember(PyrogramType):
chat_member = ChatMember(
user=user,
status="kicked" if rights.view_messages else "restricted",
status=(
"left" if member.left
else "kicked" if rights.view_messages
else "restricted"
),
until_date=0 if rights.until_date == (1 << 31) - 1 else rights.until_date,
client=client
)