mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-13 04:56:35 +03:00
Handle DraftMessageEmpty (closes #844)
This commit is contained in:
parent
2a90de2b08
commit
d4dc147459
|
@ -27,7 +27,7 @@ class Draft:
|
||||||
def __init__(self, client, peer, draft):
|
def __init__(self, client, peer, draft):
|
||||||
self._client = client
|
self._client = client
|
||||||
self._peer = peer
|
self._peer = peer
|
||||||
if not draft:
|
if not draft or not isinstance(draft, DraftMessage):
|
||||||
draft = DraftMessage('', None, None, None, None)
|
draft = DraftMessage('', None, None, None, None)
|
||||||
|
|
||||||
self._text = markdown.unparse(draft.message, draft.entities)
|
self._text = markdown.unparse(draft.message, draft.entities)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user