Fix logged out mutelist

This commit is contained in:
2023-08-06 16:03:44 +01:00
parent 325e4be2ef
commit d449c4aa57
3 changed files with 8 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import { MUTED } from "const";
export function useMute(pubkey: string) {
const login = useLogin();
const { tags, content } = login!.muted;
const { tags, content } = login?.muted ?? { tags: [] };
const muted = useMemo(() => tags.filter((t) => t.at(0) === "p"), [tags]);
const isMuted = useMemo(
() => muted.find((t) => t.at(1) === pubkey),