Fix chat silence bug

This commit is contained in:
Justin 2022-09-13 16:24:19 -04:00
parent 45afb665b9
commit ea1583dcac

View file

@ -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 };
};