mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Avoid None entities
parent
fbd5450a20
commit
12ad97b8a9
|
@ -91,7 +91,7 @@ class CustomMarkdown:
|
|||
return text, entities
|
||||
@staticmethod
|
||||
def unparse(text, entities):
|
||||
for i, e in enumerate(entities):
|
||||
for i, e in enumerate(entities or []):
|
||||
if isinstance(e, types.MessageEntityCustomEmoji):
|
||||
entities[i] = types.MessageEntityTextUrl(e.offset, e.length, f'emoji/{e.document_id}')
|
||||
if isinstance(e, types.MessageEntitySpoiler):
|
||||
|
|
Loading…
Reference in New Issue
Block a user