Don't cut off body if there's nothing there
Some checks failed
Python lint / lint (push) Has been cancelled

This commit is contained in:
Tulir Asokan 2025-08-09 22:00:29 +03:00
parent a4a39b7f90
commit 4c01a49310

View file

@ -63,7 +63,7 @@ async def parse_formatted(
else:
return message, escape(message)
text = (await MaubotHTMLParser().parse(html)).text
if len(text) + len(html) > 40000:
if len(text) > 100 and len(text) + len(html) > 40000:
text = text[:100] + "[long message cut off]"
return text, html