Skip to content

Commit 72c543e

Browse files
don't display elastic as an owner when note is created
1 parent 3c8cfbf commit 72c543e

File tree

1 file changed

+3
-2
lines changed
  • x-pack/plugins/security_solution/public/timelines/components/timeline/notes_tab_content

1 file changed

+3
-2
lines changed

x-pack/plugins/security_solution/public/timelines/components/timeline/notes_tab_content/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import { pick, uniqBy } from 'lodash/fp';
7+
import { filter, pick, uniqBy } from 'lodash/fp';
88
import {
99
EuiAvatar,
1010
EuiFlexGroup,
@@ -139,7 +139,8 @@ const NotesTabContentComponent: React.FC<NotesTabContentProps> = ({ timelineId }
139139
const isImmutable = timelineStatus === TimelineStatus.immutable;
140140
const notes: TimelineResultNote[] = useDeepEqualSelector(getNotesAsCommentsList);
141141

142-
const participants = useMemo(() => uniqBy('updatedBy', notes), [notes]);
142+
// filter for savedObjectId to make sure we don't display `elastic` user while saving the note
143+
const participants = useMemo(() => uniqBy('updatedBy', filter('savedObjectId', notes)), [notes]);
143144

144145
const associateNote = useCallback(
145146
(noteId: string) => dispatch(timelineActions.addNote({ id: timelineId, noteId })),

0 commit comments

Comments
 (0)