Update security.py

pull/114/head
Who? 2025-03-04 13:16:28 +07:00 committed by GitHub
parent 2dfa89cd5a
commit a86192836f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -390,9 +390,9 @@ class SecurityManager:
if not (config := self.get_flags(func)):
return False
if not user_id and isinstance((await c.get_entity(message.peer_id)), tl.types.User):
if not user_id and isinstance((await self.client.get_entity(message.peer_id)), tl.types.User):
user_id = message.sender_id
if not user_id and isinstance((await c.get_entity(message.peer_id)), tl.types.Channel):
if not user_id and isinstance((await self.client.get_entity(message.peer_id)), tl.types.Channel):
user_id = message.peer_id
is_channel = False