dfsfds
This commit is contained in:
parent
accf830c98
commit
5f1fdbcfca
1 changed files with 3 additions and 5 deletions
|
@ -197,15 +197,13 @@ def api_comment(v):
|
||||||
Comment.parent_submission == parent_submission,
|
Comment.parent_submission == parent_submission,
|
||||||
Comment.body == body
|
Comment.body == body
|
||||||
).first()
|
).first()
|
||||||
if existing:
|
if existing: return {"error": f"You already made that comment: {existing.permalink}"}, 409
|
||||||
return {"error": f"You already made that comment: {existing.permalink}"}, 409
|
|
||||||
|
|
||||||
if parent.author.any_block_exists(v) and not v.admin_level>=3:
|
if parent.author.any_block_exists(v) and not v.admin_level>=3: return {"error": "You can't reply to users who have blocked you, or users you have blocked."}, 403
|
||||||
return {"error": "You can't reply to users who have blocked you, or users you have blocked."}, 403
|
|
||||||
|
|
||||||
is_bot = request.headers.get("X-User-Type","")=="Bot"
|
is_bot = request.headers.get("X-User-Type","")=="Bot"
|
||||||
|
|
||||||
if not is_bot:
|
if not is_bot and 'trans lives matters' not in body.lower():
|
||||||
now = int(time.time())
|
now = int(time.time())
|
||||||
cutoff = now - 60 * 60 * 24
|
cutoff = now - 60 * 60 * 24
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue