Add missing InputUserSelf case to .get_input_peer()

This commit is contained in:
Lonami Exo 2017-11-12 18:03:42 +01:00
parent 84d48ef7bf
commit 08abef78d6

View File

@ -99,6 +99,9 @@ def get_input_peer(entity, allow_self=True):
if isinstance(entity, InputUser):
return InputPeerUser(entity.user_id, entity.access_hash)
if isinstance(entity, InputUserSelf):
return InputPeerSelf()
if isinstance(entity, UserFull):
return get_input_peer(entity.user)