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

Fix wrong enum usage (#988)

This commit is contained in:
Moshe 2022-05-06 23:08:23 +03:00 committed by GitHub
parent f1e4a0ce74
commit 0bc340081f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -369,7 +369,7 @@ class ChatEvent(Object):
elif isinstance(action, raw.types.ChannelAdminLogEventActionParticipantToggleAdmin): elif isinstance(action, raw.types.ChannelAdminLogEventActionParticipantToggleAdmin):
old_administrator_privileges = types.ChatMember._parse(client, action.prev_participant, users, chats) old_administrator_privileges = types.ChatMember._parse(client, action.prev_participant, users, chats)
new_administrator_privileges = types.ChatMember._parse(client, action.new_participant, users, chats) new_administrator_privileges = types.ChatMember._parse(client, action.new_participant, users, chats)
action = enums.ChatEventAction.ADMIN_RIGHTS_CHANGED action = enums.ChatEventAction.ADMINISTRATOR_PRIVILEGES_CHANGED
elif isinstance(action, raw.types.ChannelAdminLogEventActionParticipantToggleBan): elif isinstance(action, raw.types.ChannelAdminLogEventActionParticipantToggleBan):
old_member_permissions = types.ChatMember._parse(client, action.prev_participant, users, chats) old_member_permissions = types.ChatMember._parse(client, action.prev_participant, users, chats)