Merge branch 'frost' of github.com:Aevann1/rDrama into frost

remotes/1693176582716663532/tmp_refs/heads/watchparty
Outrun Colors 2022-09-27 17:10:47 -05:00
commit 292e97f0ec
1 changed files with 11 additions and 1 deletions

View File

@ -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!"}