add mod action if JL3 kicks post from hole (#377)
* add mod action if JL3 kicks from hole * don't be dumbremotes/1693176582716663532/tmp_refs/heads/watchparty
parent
b2b63ee23e
commit
e5de8cc66c
|
@ -356,6 +356,16 @@ def kick(v, pid):
|
|||
|
||||
old = post.sub
|
||||
post.sub = None
|
||||
|
||||
if v.admin_level >= 3 and v.id != post.author_id:
|
||||
old_str = f'<a href="/h/{old}">/h/{old}</a>'
|
||||
ma = ModAction(
|
||||
kind='move_hole',
|
||||
user_id=v.id,
|
||||
target_submission_id=post.id,
|
||||
_note=f'{old_str} → main feed',
|
||||
)
|
||||
g.db.add(ma)
|
||||
g.db.add(post)
|
||||
|
||||
cache.delete_memoized(frontlist)
|
||||
|
@ -566,4 +576,4 @@ def sub_stealth(v, sub):
|
|||
if sub.stealth:
|
||||
return {"message": f"Stealth mode has been enabled for /h/{sub} successfully!"}
|
||||
else:
|
||||
return {"message": f"Stealth mode has been disabled for /h/{sub} successfully!"}
|
||||
return {"message": f"Stealth mode has been disabled for /h/{sub} successfully!"}
|
||||
|
|
Loading…
Reference in New Issue