feat: allow mods and admins to comment on locked posts

This commit is contained in:
Xylight committed 2024-07-01 19:02:49 -07:00
1 parent 2610c87089
commit 5226504765
1 file changed
+7 -1
@@ -323,7 +323,13 @@ flex-wrap gap-4 sticky top-20 w-full box-border z-20 mt-4"
comment.detail.comment_view,
...comments.comments,
])}
locked={post.post_view.post.locked ||
locked={(post.post_view.post.locked &&
!(
$profile?.user.local_user_view.local_user.admin ||
$profile?.user?.moderates
.map((c) => c.community.id)
.includes(data.post.community_view.community.id)
)) ||
$page.params.instance.toLowerCase() != $instance.toLowerCase()}
on:focus={() => (commenting = true)}
tools={commenting}