Block Lists
Confused about "Block Lists"?
Let us know how we can improve our documentation:
A Block List is a list of words that you can use to moderate chat messages. Stream Chat comes with a built-in Block List called profanity_en_2020_v1
which contains over a thousand of the most common profane words.
You can manage your own block lists via the Stream dashboard or APIs to a manage blocklists and configure your channel types to use them. Channel types can be configured to block or flag messages from your users based on your blocklists. To do this you need to configure your channel type(s) with these two configurations: blocklist
and blocklist_behavior
. The first one refers to the name of the block list and the second must be set as block
or flag
.
Applications can have up to 15 block lists in total alongside advanced filters
A Block List can contain up to 10,000 words, each word can be up to 40 characters
The block list words must be in lowercase
Text matching is done with case insensitive word match (no prefix, post-fix support)
Messages are split into words using white spaces and hyphens (cookie-monster matches both "cookie" and "monster")
So for instance, if you have a block list with the word "cream" these messages will be blocked or flagged:
She jabbed the spoon in the ice cream and sighed
Cream is the best
and it will not affect any of these
Is creamcheese a word?
I did not enjoy watching Scream
Setup example
Copied!Confused about "Setup example"?
Let us know how we can improve our documentation:
Block Lists can be managed using the APIs like any other Chat feature. Here is a simple example on how to create a Block List and use it for a channel type.
List available block lists
Copied!Confused about "List available block lists"?
Let us know how we can improve our documentation:
All applications have the profanity_en_2020_v1
block list available. This endpoint returns all block lists available for this application.
Describe a block list
Copied!Confused about "Describe a block list"?
Let us know how we can improve our documentation:
Create new block list
Copied!Confused about "Create new block list"?
Let us know how we can improve our documentation:
Update a new block list
Copied!Confused about "Update a new block list"?
Let us know how we can improve our documentation:
Delete a block list
Copied!Confused about "Delete a block list"?
Let us know how we can improve our documentation:
When a block list is deleted, it will be automatically removed from all channel types that were using it.