This commit is contained in:
Timothy Jaeryang Baek 2024-12-24 21:16:09 -07:00
parent cd7eff3bdb
commit 4442411f40

View File

@ -92,7 +92,9 @@
}; };
const chatEventHandler = async (event) => { const chatEventHandler = async (event) => {
if (event.chat_id !== $chatId || document.visibilityState !== 'visible') { const chat = $page.url.pathname.includes(`/c/${event.chat_id}`);
if (!chat || document.visibilityState !== 'visible') {
await tick(); await tick();
const type = event?.data?.type ?? null; const type = event?.data?.type ?? null;
const data = event?.data?.data ?? null; const data = event?.data?.data ?? null;