fix(admin): Protokoll schreibt „sich selbst“ statt doppeltem Namen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-10-05 08:08:41 +02:00
1 parent 4187a1a519
commit 30473f886d
1 file changed
+2 -1
+2 -1
View File
@@ -50,7 +50,8 @@ const CATEGORIES = Object.keys(AUDIT_CATEGORY_LABEL) as AuditCategory[];
function EntryRow({ entry }: { entry: Entry }) {
const [isOpen, setIsOpen] = useState(false);
const view = formatAuditEntry(entry);
const isSelf = entry.targetType === "USER" && entry.targetId === entry.moderatorId;
const view = formatAuditEntry({ ...entry, targetLabel: isSelf ? "sich selbst" : entry.targetLabel });
const Icon = entry.isAutomatic ? Bot : CATEGORY_ICON[view.category];
const removal = isRemoval(entry.action);
const actor = entry.isAutomatic ? "Automatik" : (entry.moderatorName ?? "Unbekannt");