Duplicate commit from master to handle empty draft msg

Telegram seems to have changed something in their servers
and now this is sent.
This commit is contained in:
Lonami Exo 2018-06-13 20:57:41 +02:00
parent cb75092ba1
commit 097acd874b

View File

@ -26,7 +26,7 @@ class Draft:
def __init__(self, client, peer, draft):
self._client = client
self._peer = peer
if not draft:
if not draft or not isinstance(draft, DraftMessage):
draft = DraftMessage('', None, None, None, None)
self._text = markdown.unparse(draft.message, draft.entities)