diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index d3502b056..03fe4025d 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -595,7 +595,7 @@ } if (!chat.pinned) { - const res = await toggleChatPinnedStatusById(localStorage.token, id); + const res = await toggleChatPinnedStatusById(localStorage.token, chat.id); } initChatList(); @@ -681,7 +681,7 @@ } if (chat.pinned) { - const res = await toggleChatPinnedStatusById(localStorage.token, id); + const res = await toggleChatPinnedStatusById(localStorage.token, chat, id); } initChatList();