Experimental

Mask Sensitive Content

When a message gets flagged, there’s a window of time before it’s reviewed—during which any sensitive content is still visible to an end user. This might not be ideal, especially for things like phone numbers or other private information.

Mask and Flag is a two-part moderation action that:

  1. Masks blocklisted words in messages by replacing them with asterisks
  2. Flags the message for moderator review

When this action is triggered, users see the censored version of the message while moderators can review the original content.

Mask and Flag action is only supported for Chat Moderation.

Setup Mask and Flag Action for Chat Moderation

Mask and Flag is available as an action for blocklist. You can use mask_flag action in your block_list_config’s rule.

client.moderation.upsertConfig({
    key: 'chat',
    block_list_config: {
        enabled: true,
        rules: [
        { name: blocklistName, action: 'mask_flag', team: '' },
        ],
    },
}),

Usecases

Mask phone numbers

We can use “Mask and Flag” feature so that phone numbers will not be shown to a user in Chat Messages.

Create a Policy and add a regex filter blocklist for the phone number(Example phone number regex: (?m)(\+?\d{1,2}\s?)?(\(?\d{3}\)?[\s.-]?)?\d{3}[\s.-]?\d{4}). Set the action of that policy to Mask and Flag

Phone Number Regex Filter

That’s it! Phone number sent by users will be masked and won’t be exposed to an end user. Moderator can still see the original content and will be able to take an informed decision.

Masked Phone Number

© Getstream.io, Inc. All Rights Reserved.