Skip to content

Commit

Permalink
fix: sticky DS selection should be at WS level
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanierh committed Sep 8, 2023
1 parent b0f480c commit 3844b20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions front/pages/w/[wId]/u/chat/[cId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const getServerSideProps: GetServerSideProps<{
if (user) {
const stickyDataSourceSelectionRaw = await getUserMetadata(
user,
"chat-data-sources-selection"
`chat-data-sources-selection-${owner.sId}`
);
if (stickyDataSourceSelectionRaw) {
try {
Expand Down Expand Up @@ -1049,7 +1049,7 @@ export default function AppChat({
void (async () => {
let stickySelection: { [key: string]: boolean } = {};
const currentStickySelectionRaw = await getUserMetadataFromClient(
"chat-data-sources-selection"
`chat-data-sources-selection-${owner.sId}`
);
if (currentStickySelectionRaw) {
stickySelection = JSON.parse(currentStickySelectionRaw.value);
Expand All @@ -1059,7 +1059,7 @@ export default function AppChat({
...stickyDataSourceSelectionUpdate,
};
await setUserMetadataFromClient({
key: "chat-data-sources-selection",
key: `chat-data-sources-selection-${owner.sId}`,
value: JSON.stringify(stickySelection),
});
})();
Expand Down

0 comments on commit 3844b20

Please sign in to comment.