truncate url responses

main
Yorick van Pelt 2024-04-27 11:11:05 +02:00
parent 6eb4056bd3
commit 95845ea80d
Signed by: yorick
GPG Key ID: D8D3CC6D951384DE
1 changed files with 2 additions and 0 deletions

View File

@ -111,6 +111,8 @@ class Plugin(IPlugin):
for link in get_links(self.linkify, msg):
try:
res = await self.metadata(link)
if len(res) > 400:
res = res[:400] + "..."
except Exception as e:
traceback.print_exc()
print("error", e)