"""""fix"""""" ping groups in /submit

master
Aevann 2023-08-02 11:27:03 +03:00
parent b1f4290703
commit 299bda3b8a
2 changed files with 2 additions and 6 deletions

View File

@ -116,6 +116,7 @@ def add_notif(cid, uid, text, pushnotif_url=''):
if ' has mentioned you: [' in text: if ' has mentioned you: [' in text:
text = text.split(':')[0] + '!' text = text.split(':')[0] + '!'
if not request.path.startswith('/submit'):
push_notif({uid}, 'New notification', text, pushnotif_url) push_notif({uid}, 'New notification', text, pushnotif_url)

View File

@ -449,11 +449,6 @@ def submit_post(v, sub=None):
body = request.values.get("body", "") body = request.values.get("body", "")
body = body[:POST_BODY_LENGTH_LIMIT(g.v)].strip() body = body[:POST_BODY_LENGTH_LIMIT(g.v)].strip()
post_ping_group_count = len(list(group_mention_regex.finditer(body)))
if post_ping_group_count:
abort(400, "Ping group usage is temporarily disabled on creating posts due to performance issues (will fix in a bit), for now make the post without ping groups then edit it and add the ping groups")
if not title: if not title:
abort(400, "Please enter a better title!") abort(400, "Please enter a better title!")