From 7c8ddc56876a284327d4e155253297cf7d3ca1e8 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 21 May 2024 02:16:44 +0300 Subject: [PATCH] fix 500 error --- files/helpers/offsite_mentions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/helpers/offsite_mentions.py b/files/helpers/offsite_mentions.py index 191640309..fdbf2f0da 100644 --- a/files/helpers/offsite_mentions.py +++ b/files/helpers/offsite_mentions.py @@ -8,6 +8,9 @@ from files.helpers.alerts import push_notif from files.classes.notifications import Notification def notify(text, created_utc): + if len(text) > 1000: + text = text[:1000] + "..." + text = sanitize(text, blackjack="offsite mention", golden=False) existing_comment = g.db.query(Comment.id).filter_by(