From 097acd874b4f2ce47d3519512339816ee6aed552 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Wed, 13 Jun 2018 20:57:41 +0200 Subject: [PATCH] Duplicate commit from master to handle empty draft msg Telegram seems to have changed something in their servers and now this is sent. --- telethon/tl/custom/draft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/tl/custom/draft.py b/telethon/tl/custom/draft.py index 88aec35a..1fa6514d 100644 --- a/telethon/tl/custom/draft.py +++ b/telethon/tl/custom/draft.py @@ -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)