increase max ping limit for comments from 3 to 5

remotes/1693045480750635534/spooky-22
Aevann1 2022-08-21 22:17:55 +02:00
parent d49cba78a3
commit e2c6321b94
3 changed files with 5 additions and 4 deletions

View File

@ -288,7 +288,7 @@ def comment(v):
if v.agendaposter and not v.marseyawarded and parent_post.id not in ADMIGGERS and parent_post.sub != 'chudrama':
body = torture_ap(body, v.username)
body_html = sanitize(body, limit_pings=3)
body_html = sanitize(body, limit_pings=5)
if parent_post.id not in ADMIGGERS and '!slots' not in body.lower() and '!blackjack' not in body.lower() and '!wordle' not in body.lower() and AGENDAPOSTER_PHRASE not in body.lower() and parent_post.sub != 'chudrama':
@ -718,7 +718,7 @@ def edit_comment(cid, v):
body = body.strip()
body_html = sanitize(body, edit=True, limit_pings=3)
body_html = sanitize(body, edit=True, limit_pings=5)
if len(body_html) > 20000: abort(400)

View File

@ -23,7 +23,8 @@ def error_401(e):
@app.errorhandler(406)
def error_406(e):
if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error": "Too many pings: max limit is 3 for comments and 50 for posts"}, 406
if request.headers.get("Authorization") or request.headers.get("xhr"):
return {"error": "Too many pings: max limit is 5 for comments and 50 for posts"}, 406
else: return render_template('errors/406.html', err=True), 406
@app.errorhandler(403)

View File

@ -13,7 +13,7 @@
<img alt=":#marseyrage" loading="lazy" src="/e/marseyrage.webp">
<pre></pre>
<h1 class="h5">Too many pings</h1>
<p class="text-muted mb-5">Max limit is 3 for comments and 50 for posts</p>
<p class="text-muted mb-5">Max limit is 5 for comments and 50 for posts</p>
<div><a href="/" class="btn btn-primary">Go to frontpage</a></div>
</div>
</div>