mirror of
https://github.com/maubot/maubot
synced 2025-08-28 20:30:38 +00:00
Don't cut off body if there's nothing there
Some checks failed
Python lint / lint (push) Has been cancelled
Some checks failed
Python lint / lint (push) Has been cancelled
This commit is contained in:
parent
a4a39b7f90
commit
4c01a49310
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ async def parse_formatted(
|
||||||
else:
|
else:
|
||||||
return message, escape(message)
|
return message, escape(message)
|
||||||
text = (await MaubotHTMLParser().parse(html)).text
|
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]"
|
text = text[:100] + "[long message cut off]"
|
||||||
return text, html
|
return text, html
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue