mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Fix EntityDatabase failing with InputPeer keys
This commit is contained in:
parent
4a482b3506
commit
401de913af
|
@ -148,8 +148,8 @@ class EntityDatabase:
|
|||
|
||||
if isinstance(key, TLObject):
|
||||
sc = type(key).SUBCLASS_OF_ID
|
||||
if sc == 0x2d45687:
|
||||
# Subclass of "Peer"
|
||||
if sc in {0x2d45687, 0xc91c90b6}:
|
||||
# Subclass of "Peer" or "InputPeer"
|
||||
return self._entities[utils.get_peer_id(key, add_mark=True)]
|
||||
elif sc in {0x2da17977, 0xc5af5d94, 0x6d44b7db}:
|
||||
# Subclass of "User", "Chat" or "Channel"
|
||||
|
|
Loading…
Reference in New Issue
Block a user