mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Avoid relying on .__iter__ to tell iterators apart
.send_file() would fail with stream objects (those from open()) since they are iterable, and asserting that they weren't bytes or str was not enough.
This commit is contained in:
@@ -14,7 +14,7 @@ def _into_id_set(client, chats):
|
||||
if chats is None:
|
||||
return None
|
||||
|
||||
if not hasattr(chats, '__iter__') or isinstance(chats, str):
|
||||
if not utils.is_list_like(chats):
|
||||
chats = (chats,)
|
||||
|
||||
result = set()
|
||||
|
Reference in New Issue
Block a user