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

pull/175/head
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,7 +116,8 @@ def add_notif(cid, uid, text, pushnotif_url=''):
if ' has mentioned you: [' in text:
text = text.split(':')[0] + '!'
push_notif({uid}, 'New notification', text, pushnotif_url)
if not request.path.startswith('/submit'):
push_notif({uid}, 'New notification', text, pushnotif_url)
def NOTIFY_USERS(text, v, oldtext=None, ghost=False, log_cost=None):

View File

@ -449,11 +449,6 @@ def submit_post(v, sub=None):
body = request.values.get("body", "")
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:
abort(400, "Please enter a better title!")