Legacy Notice: This extension is considered legacy and is scheduled for deprecation in the near future. It is no longer recommended for new integrations.Please note: Legacy extensions are no longer actively maintained and will not receive feature updates or enhancements.
Extension settings
- Login to CometChat and select your app.
- Go to the Extensions section and enable the Data Masking Filter extension.
-
Open the Settings for this extension and configure the following:
- Drop Message: If enabled, any message with sensitive information will be dropped.
- Default Masks: Masks for Emails, Social Security Numbers (SSN), US phone numbers are built in.
- Custom Masks: Add more regex that will act as masks for some form of sensitive information.
- Save the extension settings.
Refer this for more details on Regular Expressions.
How does it work?
Once the Extension is enabled for your App and the Extension Settings are done, the recipients will receive metadata with the masked message. Here is a sample response:- JSON
Implementation
At the recipients’ end, from the message object, you can fetch the metadata by calling the getMetadata() method. Using this metadata, you can fetch the masked message.- JavaScript
- Java
- Kotlin
- Swift