feat: add 'removed by moderator' + link to modlog

This commit is contained in:
James Xylight committed 2025-08-31 10:52:04 -07:00
1 parent 61d674d0e2
commit d25eae8bdc
3 files changed
+24 -1

No files matched your search

@@ -1,3 +1,4 @@
import { t } from '$lib/i18n/translations'
import type { Comment, CommentView } from 'lemmy-js-client'
import { SvelteMap } from 'svelte/reactivity'
@@ -35,6 +36,9 @@ export function buildCommentsTree(
for (const comment_view of comments) {
const depthI = getDepthFromComment(comment_view.comment) ?? 0
const depth = depthI + baseDepth
if (comment_view.comment.content == '' && comment_view.comment.removed) {
comment_view.comment.content = `*Removed by Moderator — [${t.get('routes.modlog.title')}](/modlog?comment=${comment_view.comment.id})*`
}
const node: CommentNodeI = {
comment_view,
children: [],