Feature Announcement: Mitigate Profanity With Block Lists

Nick P.
Nick P.
Published October 1, 2020 Updated April 29, 2022

Many companies that allow end-users to openly chat with one another open up a significant risk to unsavory and often harmful content within an application.

The fine balance between open, unfiltered conversation, and an overbearing moderation system is one that Stream is acutely aware of. We’re constantly releasing more and more robust tools to ease this burden for our customers in industries such as Education and Social Media.

One such feature is Block Lists. Block lists allow you to select from a predefined list of more than 1,000 profane words, in addition to creating your own lists of words you’d like to prevent from showing up in your channels. You can define behavior for an individual block list by specifying one of two options: flag or block.

This most recent moderation tool from Stream may be a simple one, but it is incredibly powerful for three main reasons:

  1. It is extremely easy to set up and requires no hosted solution or additional code client-side or server-side.
  2. The moderation (flag or block) runs automatically and does not require initial human interaction with the content.
  3. Choosing different block list behavior allows you to block the more severe offenses, but flag borderline content.

Enabling the Default List

This requires server-side authentication and can be enabled in just a handful of lines of code:

// update the channel by passing your block list options as an object
await client.updateChannelType("messaging", {
  blocklist: "profanity_en_2020_v1",
  blocklist_behavior: "flag"

Adding a Custom List to a Channel Type

Adding a custom list is also very straightforward:

// to create a custom block list, provide a name and an array of words to block
await client.createBlockList({
   name: "no-cakes",
   words: ["fudge", "cream", "sugar"],

Once you have defined your custom block list, you can enable the block list for a specified channel, as shown below:

// enable the blocklist for the channel type "messaging"
await client.updateChannelType("messaging", {
    blocklist: "no-cakes",
    blocklist_behavior: "block"

We’re excited that our customers of all sizes can benefit from this simple but powerful new feature to ensure a rich and safe experience for the end-user. Keep an eye out for more upcoming new features in Q4!

decorative lines
Integrating Video with your App?
We've built a Video and Audio solution just for you. Check out our APIs and SDKs.
Learn more ->