Skip to content

Commit

Permalink
Merge pull request #2364 from techmatters/CHI-2799-fix_intro_message_…
Browse files Browse the repository at this point in the history
…removal

CHI-2799: Only remove first message from list on web tasks when masking identifiers
  • Loading branch information
stephenhand authored Jun 25, 2024
2 parents 46a4a86 + 1ac2c1f commit 23100bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin-hrm-form/src/maskIdentifiers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,15 @@ export const maskManagerStringsWithIdentifiers = <T extends Strings<string> & {
export const maskMessageListWithIdentifiers = () => {
const can = getInitializedCan();
const maskIdentifiers = !can(PermissionActions.VIEW_IDENTIFIERS);

if (!maskIdentifiers) return;

MessagingCanvas.defaultProps.memberDisplayOptions = {
theirDefaultName: 'XXXXXX',
theirFriendlyNameOverride: false,
yourFriendlyNameOverride: true,
};
MessageList.Content.remove('0');
MessageList.Content.remove('0', {
if: ({ conversation }) => conversation?.source?.attributes?.channel_type === 'web',
});
};

0 comments on commit 23100bb

Please sign in to comment.