diff --git a/plugins/chunter-resources/src/components/chat-message/ChatMessagePopup.svelte b/plugins/chunter-resources/src/components/chat-message/ChatMessagePopup.svelte index b6222c21e4..d5e6fd5cc9 100644 --- a/plugins/chunter-resources/src/components/chat-message/ChatMessagePopup.svelte +++ b/plugins/chunter-resources/src/components/chat-message/ChatMessagePopup.svelte @@ -35,7 +35,7 @@ let messages: ChatMessage[] = [] let activityOrderNewestFirst = JSON.parse(localStorage.getItem('activity-newest-first') ?? 'false') - + $: localStorage.setItem('activity-newest-first', JSON.stringify(activityOrderNewestFirst)) $: query.query( chunter.class.ChatMessage, { attachedTo: objectId }, diff --git a/server/core/src/indexer/fulltextPush.ts b/server/core/src/indexer/fulltextPush.ts index 7b82b9ff58..431665a7f1 100644 --- a/server/core/src/indexer/fulltextPush.ts +++ b/server/core/src/indexer/fulltextPush.ts @@ -305,7 +305,7 @@ function updateDoc2Elastic ( doc[docIdAttr] = typeof doc[docIdAttr] === 'string' ? [doc[docIdAttr]] : [...(doc[docIdAttr] ?? [])] if (vv !== '') { if (typeof vv !== 'object') { - doc[docIdAttr].push(vv) + doc[docIdAttr] = Array.from(new Set([...doc[docIdAttr], vv])) } } }