Handle DraftMessageEmpty (closes #844)

This commit is contained in:
Lonami Exo 2018-06-12 19:25:13 +02:00
parent 2a90de2b08
commit d4dc147459

View File

@ -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)