mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 11:23:46 +03:00
Fix-up bot API style IDs not working on .get_input_entity
This commit is contained in:
parent
0f34a9b333
commit
3a3ae75b46
|
@ -177,7 +177,7 @@ class MemorySession(Session):
|
|||
key = utils.get_peer_id(key)
|
||||
exact = True
|
||||
else:
|
||||
exact = False
|
||||
exact = not isinstance(key, int) or key < 0
|
||||
|
||||
result = None
|
||||
if isinstance(key, str):
|
||||
|
|
|
@ -2285,9 +2285,10 @@ class TelegramClient(TelegramBareClient):
|
|||
'Cannot turn "{}" into an input entity.'.format(original_peer)
|
||||
)
|
||||
|
||||
# Add the mark to the peers if the user passed a Peer (not an int)
|
||||
# Add the mark to the peers if the user passed a Peer (not an int),
|
||||
# or said ID is negative. If it's negative it's been marked already.
|
||||
# Look in the dialogs with the hope to find it.
|
||||
mark = not isinstance(peer, int)
|
||||
mark = not isinstance(peer, int) or peer < 0
|
||||
target_id = utils.get_peer_id(peer)
|
||||
req = GetDialogsRequest(
|
||||
offset_date=None,
|
||||
|
|
Loading…
Reference in New Issue
Block a user