Controlling content masking
Vary masking rules for each participant.
Content masking normally follows a user's role. To apply different masking rules for a specific participant in a specific conversation, set takeSettingsFromRole.contentMasking to the name of another role using the JavaScript Data API or REST API.
Configure that role's masking rules in the dashboard. The override controls what the participant sees, including existing messages. Other settings still come from their usual role. Set contentMasking to null to restore that role's masking rules.
In a marketplace app, you might want to mask contact details by default, but let the buyer and seller see them after a transaction.
In the dashboard, go to Chat UI → Edit roles → Create role and create a new role named no_masking. In that role's Chat UI settings, under Mask unwanted content, set Mode to No suppression. Publish the role to live when using your live app ID.
Then, update the buyer's participation:
1curl https://api.talkjs.com/v1/<APP_ID>/conversations/order_391_fc/participants/betty_buyer \2 -H "Authorization: Bearer <YOUR_TOKEN>" \3 -H "Content-Type: application/json" \4 -X PATCH \5 -d '{ "takeSettingsFromRole": { "contentMasking": "no_masking" } }'
Repeat for the seller and any other participants who should see unmasked content.