From 1ac2c1fbf2b92dabeed4d6b99782ed473388b628 Mon Sep 17 00:00:00 2001 From: Stephen Hand Date: Mon, 24 Jun 2024 20:57:51 +0100 Subject: [PATCH] Only remove first message from list on web tasks when masking identifiers --- plugin-hrm-form/src/maskIdentifiers/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin-hrm-form/src/maskIdentifiers/index.ts b/plugin-hrm-form/src/maskIdentifiers/index.ts index 7ce4c1331d..f57191aa2e 100644 --- a/plugin-hrm-form/src/maskIdentifiers/index.ts +++ b/plugin-hrm-form/src/maskIdentifiers/index.ts @@ -76,6 +76,7 @@ export const maskManagerStringsWithIdentifiers = & { export const maskMessageListWithIdentifiers = () => { const can = getInitializedCan(); const maskIdentifiers = !can(PermissionActions.VIEW_IDENTIFIERS); + if (!maskIdentifiers) return; MessagingCanvas.defaultProps.memberDisplayOptions = { @@ -83,5 +84,7 @@ export const maskMessageListWithIdentifiers = () => { theirFriendlyNameOverride: false, yourFriendlyNameOverride: true, }; - MessageList.Content.remove('0'); + MessageList.Content.remove('0', { + if: ({ conversation }) => conversation?.source?.attributes?.channel_type === 'web', + }); };