From 898e550335b9979a131dd956c8aa26a01d341b4c Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sat, 24 Mar 2018 12:09:33 +0100 Subject: [PATCH] Except the right type for get_input_peer (closes #722) --- telethon/sessions/memory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/sessions/memory.py b/telethon/sessions/memory.py index e5223cac..5faf721d 100644 --- a/telethon/sessions/memory.py +++ b/telethon/sessions/memory.py @@ -78,7 +78,7 @@ class MemorySession(Session): try: p = utils.get_input_peer(e, allow_self=False) marked_id = utils.get_peer_id(p) - except ValueError: + except TypeError: return if isinstance(p, (InputPeerUser, InputPeerChannel)):