Merge branch 'asyncio' of https://github.com/LonamiWebs/Telethon into asyncio-upstream

* 'asyncio' of https://github.com/LonamiWebs/Telethon:
  Duplicate commit from master to handle empty draft msg
This commit is contained in:
Andrey Egorov 2018-06-14 15:34:21 +03:00
commit 85103bcf6d

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)