From 3224b03a98853e3545f6c7187a43636b606574d7 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Sun, 2 Jul 2023 18:20:05 +0200 Subject: [PATCH] fix: don't render link for anon profiles --- src/element/live-chat.tsx | 2 +- src/element/profile.tsx | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/element/live-chat.tsx b/src/element/live-chat.tsx index e5b8db9..d1880f7 100644 --- a/src/element/live-chat.tsx +++ b/src/element/live-chat.tsx @@ -146,7 +146,7 @@ function ChatZap({ ev }: { ev: TaggedRawEvent }) {
- {(options?.showAvatar ?? true) && pubkey === "anon" ? ( - - ) : ( - {profile?.name - )} - {(options?.showName ?? true) && ( + {showAvatar && + (pubkey === "anon" ? ( + + ) : ( + {profile?.name + ))} + {showName && ( {options?.overrideName ?? pubkey === "anon" ? "Anon"