mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix-up 52292d7
accessing types under the wrong module
This commit is contained in:
parent
056842d1a0
commit
d8fa0c81f6
|
@ -230,7 +230,8 @@ def get_input_document(document):
|
|||
_raise_cast_fail(document, 'InputDocument')
|
||||
|
||||
if isinstance(document, types.Document):
|
||||
return types.InputDocument(id=document.id, access_hash=document.access_hash)
|
||||
return types.InputDocument(
|
||||
id=document.id, access_hash=document.access_hash)
|
||||
|
||||
if isinstance(document, types.DocumentEmpty):
|
||||
return types.InputDocumentEmpty()
|
||||
|
@ -680,7 +681,8 @@ def get_peer_id(peer, add_mark=True):
|
|||
try:
|
||||
if peer.SUBCLASS_OF_ID not in (0x2d45687, 0xc91c90b6):
|
||||
if isinstance(peer, (
|
||||
types.ResolvedPeer, types.InputNotifyPeer, types.TopPeer)):
|
||||
types.contacts.ResolvedPeer, types.InputNotifyPeer,
|
||||
types.TopPeer)):
|
||||
peer = peer.peer
|
||||
else:
|
||||
# Not a Peer or an InputPeer, so first get its Input version
|
||||
|
|
Loading…
Reference in New Issue
Block a user