forked from rDrama/rDrama
disable pinning for 3 days
parent
79479d9ffd
commit
d10a1c8693
|
@ -1254,7 +1254,7 @@ def api_distinguish_post(post_id, v):
|
||||||
@app.post("/sticky/<post_id>")
|
@app.post("/sticky/<post_id>")
|
||||||
@admin_level_required(2)
|
@admin_level_required(2)
|
||||||
def sticky_post(post_id, v):
|
def sticky_post(post_id, v):
|
||||||
|
abort(403)
|
||||||
post = get_post(post_id)
|
post = get_post(post_id)
|
||||||
if post and not post.stickied:
|
if post and not post.stickied:
|
||||||
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False).count()
|
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False).count()
|
||||||
|
|
|
@ -197,6 +197,7 @@ def award_thing(v, thing_type, id):
|
||||||
if note: text += f" ({note})"
|
if note: text += f" ({note})"
|
||||||
notify_mod_action(v.id, text)
|
notify_mod_action(v.id, text)
|
||||||
elif kind == "pin":
|
elif kind == "pin":
|
||||||
|
abort(403)
|
||||||
if thing.stickied and thing.stickied_utc:
|
if thing.stickied and thing.stickied_utc:
|
||||||
thing.stickied_utc += 3600
|
thing.stickied_utc += 3600
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1187,9 +1187,9 @@ def submit_post(v, sub=None):
|
||||||
if body.startswith('!slots'):
|
if body.startswith('!slots'):
|
||||||
check_for_slots_command(body, snappy, c)
|
check_for_slots_command(body, snappy, c)
|
||||||
|
|
||||||
if body.startswith(':#marseypin:') or body.startswith(':#marseypin2:'):
|
# if body.startswith(':#marseypin:') or body.startswith(':#marseypin2:'):
|
||||||
post.stickied = "Snappy"
|
# post.stickied = "Snappy"
|
||||||
post.stickied_utc = int(time.time()) + 3600
|
# post.stickied_utc = int(time.time()) + 3600
|
||||||
|
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue