From 6c51c35ccfd413b434652a8d2b3b7f0d3efaae41 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Tue, 24 Jul 2018 18:20:34 +0200 Subject: [PATCH] Fix _iter_ids not expecting InputChannel --- telethon/client/messages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/client/messages.py b/telethon/client/messages.py index 4f44a78b..fc6112db 100644 --- a/telethon/client/messages.py +++ b/telethon/client/messages.py @@ -751,7 +751,7 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods): total[0] = len(ids) from_id = None # By default, no need to validate from_id - if isinstance(entity, types.InputPeerChannel): + if isinstance(entity, (types.InputChannel, types.InputPeerChannel)): r = await self(functions.channels.GetMessagesRequest(entity, ids)) else: r = await self(functions.messages.GetMessagesRequest(ids))