diff --git a/__tests__/html/linkDefinition/badge.html b/__tests__/html/linkDefinition/badge.html index d2546f85ea..52020a8ed0 100644 --- a/__tests__/html/linkDefinition/badge.html +++ b/__tests__/html/linkDefinition/badge.html @@ -138,6 +138,10 @@ 'title', 'Sit veniam do irure velit est et quis ut Lorem reprehenderit commodo cillum occaecat\n\nNisi quis ut sint elit est nulla enim eiusmod. Deserunt commodo pariatur nostrud culpa aliquip esse pariatur exercitation nulla do proident. Est qui eiusmod aliquip deserunt labore consequat fugiat. Ullamco reprehenderit nostrud eiusmod nisi nulla esse id. Reprehenderit aliqua quis consectetur sit cupidatat fugiat Lorem ex labore. Eiusmod velit laborum quis tempor incididunt excepteur culpa esse nulla.' ); + + expect( + document.querySelector('.webchat__link-definitions__message-sensitivity-label--is-encrypted') + ).toBeTruthy(); }); diff --git a/packages/component/src/Attachment/Text/private/MarkdownTextContent.tsx b/packages/component/src/Attachment/Text/private/MarkdownTextContent.tsx index 1a0df0d783..952433972d 100644 --- a/packages/component/src/Attachment/Text/private/MarkdownTextContent.tsx +++ b/packages/component/src/Attachment/Text/private/MarkdownTextContent.tsx @@ -166,7 +166,7 @@ const MarkdownTextContent = memo(({ activity, markdown }: Props) => { if (usageInfo) { const { pattern } = usageInfo; - const encryptionStatus = usageInfo.keywords?.find(({ name }) => name === 'encryptionStatus')?.termCode; + const encryptionStatus = !!usageInfo.keywords?.find(keyword => keyword === 'encrypted-content'); return { color: @@ -174,7 +174,7 @@ const MarkdownTextContent = memo(({ activity, markdown }: Props) => { pattern.inDefinedTermSet === 'https://www.w3.org/TR/css-color-4/' && pattern.name === 'color' && pattern.termCode, - isEncrypted: encryptionStatus === 'encrypted', + isEncrypted: encryptionStatus, name: usageInfo.name, title: usageInfo.description }; diff --git a/packages/component/src/Attachment/Text/private/MessageSensitivityLabel.tsx b/packages/component/src/Attachment/Text/private/MessageSensitivityLabel.tsx index 2124e89f1a..da3d6284e4 100644 --- a/packages/component/src/Attachment/Text/private/MessageSensitivityLabel.tsx +++ b/packages/component/src/Attachment/Text/private/MessageSensitivityLabel.tsx @@ -13,7 +13,13 @@ type Props = Readonly<{ const MessageSensitivityLabel = memo(({ className, color, isEncrypted, name, title }: Props) => (
[name, title].filter(Boolean).join('\n\n'), [name, title])} > (entries?: TEntries abstract: orgSchemaProperty(string()), author: orgSchemaProperties(string()), citation: orgSchemaProperties(lazy(() => creativeWork())), - keywords: orgSchemaProperties(lazy(() => definedTerm())), + keywords: orgSchemaProperties(union([lazy(() => definedTerm()), string()])), pattern: orgSchemaProperty(lazy(() => definedTerm())), text: orgSchemaProperty(string()), usageInfo: orgSchemaProperty(lazy(() => creativeWork())),