diff --git a/app/soapbox/queries/chats.ts b/app/soapbox/queries/chats.ts index 738e0ca21..cc910b9c6 100644 --- a/app/soapbox/queries/chats.ts +++ b/app/soapbox/queries/chats.ts @@ -190,6 +190,8 @@ const useChatSilences = () => { const data = await getChatSilences(); if (data) { setSilenced(true); + } else { + setSilenced(false); } }; @@ -228,8 +230,10 @@ const useChatSilences = () => { }; useEffect(() => { - fetchChatSilence(); - }, []); + if (chat?.id) { + fetchChatSilence(); + } + }, [chat]); return { isSilenced, handleSilence }; };