Fix unmuting users with no metadata

This commit is contained in:
Bojan Mojsilovic 2023-08-30 23:16:27 +02:00
parent bc8d273976
commit 8df977a8f5
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ const Muted: Component = () => {
const [isFetching, setIsFetching] = createSignal(true); const [isFetching, setIsFetching] = createSignal(true);
const user = (pubkey: string) => mutedUsers[pubkey]; const user = (pubkey: string) => mutedUsers[pubkey] || { pubkey, npub: hexToNpub(pubkey) };
createEffect(() => { createEffect(() => {
if (account && account.isKeyLookupDone) { if (account && account.isKeyLookupDone) {

View File

@ -96,7 +96,7 @@ export const nip05Verification = (user: PrimalUser | undefined) => {
return ''; return '';
} }
if (user.nip05.startsWith('_@')) { if (user.nip05?.startsWith('_@')) {
return user.nip05.slice(2); return user.nip05.slice(2);
} }