From 8df977a8f56ee842c1046cca5f402a6ff88129f2 Mon Sep 17 00:00:00 2001 From: Bojan Mojsilovic Date: Wed, 30 Aug 2023 23:16:27 +0200 Subject: [PATCH] Fix unmuting users with no metadata --- src/pages/Settings/Muted.tsx | 2 +- src/stores/profile.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Settings/Muted.tsx b/src/pages/Settings/Muted.tsx index ed348dc..b5a9dde 100644 --- a/src/pages/Settings/Muted.tsx +++ b/src/pages/Settings/Muted.tsx @@ -27,7 +27,7 @@ const Muted: Component = () => { const [isFetching, setIsFetching] = createSignal(true); - const user = (pubkey: string) => mutedUsers[pubkey]; + const user = (pubkey: string) => mutedUsers[pubkey] || { pubkey, npub: hexToNpub(pubkey) }; createEffect(() => { if (account && account.isKeyLookupDone) { diff --git a/src/stores/profile.ts b/src/stores/profile.ts index 5ea97be..0f7c816 100644 --- a/src/stores/profile.ts +++ b/src/stores/profile.ts @@ -96,7 +96,7 @@ export const nip05Verification = (user: PrimalUser | undefined) => { return ''; } - if (user.nip05.startsWith('_@')) { + if (user.nip05?.startsWith('_@')) { return user.nip05.slice(2); }