This commit is contained in:
Timothy Jaeryang Baek committed 2026-06-25 03:26:17 +01:00
1 parent 1111a3a222
commit 1457f2dec8
4 files changed
+92 -91

No files matched your search

@@ -55,7 +55,6 @@
let orderBy = 'updated_at';
let direction = 'desc'; // 'asc' or 'desc'
$: if (chats) {
init();
}
@@ -38,18 +38,18 @@
if (folder && folder.id) {
// Always use the shared folder endpoint so owners also see
// chats created by users who have write access to this folder.
const res = await getSharedFolderChats(localStorage.token, folder.id).catch(
(error) => {
console.error(error);
return null;
}
);
const res = await getSharedFolderChats(localStorage.token, folder.id).catch((error) => {
console.error(error);
return null;
});
if (res && res.chats) {
chats = res.chats;
allChatsLoaded = true;
} else {
// Fallback to regular API (e.g. if user has no shared access)
const fallback = await getChatListByFolderId(localStorage.token, folder.id, page).catch(() => []);
const fallback = await getChatListByFolderId(localStorage.token, folder.id, page).catch(
() => []
);
chats = fallback || [];
}
} else {