From d58c729af066c3b3e3d1ac8c1482162e76aff2b5 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Tue, 24 Oct 2017 09:42:51 +0200 Subject: [PATCH] Add missing InputPeerSelf case to .get_input_user --- telethon/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/telethon/utils.py b/telethon/utils.py index d8bfb89f..afb24b16 100644 --- a/telethon/utils.py +++ b/telethon/utils.py @@ -142,7 +142,10 @@ def get_input_user(entity): else: return InputUser(entity.id, entity.access_hash) - if isinstance(entity, UserEmpty): + if isinstance(entity, InputPeerSelf): + return InputUserSelf() + + if isinstance(entity, (UserEmpty, InputPeerEmpty)): return InputUserEmpty() if isinstance(entity, UserFull):