This commit is contained in:
Classic298 2026-10-01 00:21:28 +02:00 • committed by GitHub
commit b9888b9ae5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,8 +52,10 @@
if (await loadSharedChat()) {
await tick();
loaded = true;
} else {
} else if (localStorage.token) {
await goto('/');
} else {
await goto(`/auth?redirect=${encodeURIComponent($page.url.pathname)}`);
}
})();
}
@ -102,10 +104,7 @@
: []
);
await chatId.set(shareId);
chat = await getChatByShareId(token, shareId).catch(async (error) => {
await goto('/');
return null;
});
chat = await getChatByShareId(token, shareId).catch(() => null);
if (chat) {
user = token