diff --git a/files/routes/subs.py b/files/routes/subs.py index e920e89d4..1045ce354 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -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'/h/{old}' + 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!"} \ No newline at end of file + return {"message": f"Stealth mode has been disabled for /h/{sub} successfully!"}