lawlzposts: don't allow unpin awards
lawlzposts: disable if pins feature flag is offremotes/1693176582716663532/tmp_refs/heads/watchparty
parent
bd0f56fd22
commit
0a9e7b3ef4
|
@ -421,6 +421,7 @@ def execute_antispam_comment_check(body, v):
|
|||
def execute_lawlz_actions(v:User, p:Submission):
|
||||
if v.id != LAWLZ_ID: return
|
||||
if SITE_NAME != 'rDrama': return
|
||||
if not FEATURES['PINS']: return
|
||||
p.stickied_utc = int(time.time()) + 86400
|
||||
p.stickied = v.username
|
||||
p.distinguish_level = 6
|
||||
|
|
|
@ -233,6 +233,7 @@ def award_thing(v, thing_type, id):
|
|||
cache.delete_memoized(frontlist)
|
||||
elif kind == "unpin":
|
||||
if not thing.stickied_utc: abort(403)
|
||||
if thing.author_id == LAWLZ_ID and SITE_NAME == 'rDrama': abort(403, "You can't unpin lawlzposts!")
|
||||
|
||||
if thing_type == 'comment':
|
||||
t = thing.stickied_utc - 3600*6
|
||||
|
|
Loading…
Reference in New Issue