Automatic Actions based on Words found in posts

New for 1.9 is the ability to take some actions based on watched words found in a post.

  • Block the post at the time it is submitted. User sees a message saying they’ve used a word that’s not allowed.
  • Flag the post as inappropriate, but allow it to be submitted.
  • Censor the words, which replaces the censored_words site setting being removed by this feature.
  • Require Approval of the post, hiding it until staff reviews it.
  • add a Link to a word
  • Replace words in posts with other words
  • Tag the post automatically. 1 or more tags can be added.
  • Silence a user who uses a specific word on the first post and send the post to the moderation queue

There’s a max of 1000 words per action. In practice, “bad word lists” I found rarely contain more than a few hundred.

* can be used as a wildcard.

Found in Admin, the navigation is similar to the settings.

By default, the words are hidden. Checking the “show words” checkbox will display them and allow you to delete them. Using the search field will also reveal any matching words.

25 Likes

Are staff bypassed here? TL4?

For staff it would be kind of weird to require approval by same staff member.

I am tempted to put a “require approval” on TL0 that have @sam in the post :face_with_thermometer:

9 Likes

Staff posts bypass these checks, but not TL4.

10 Likes

We should definitely move this into Logs, as in “Screened Words” (philosophically speaking, that’s what we’re doing, right?) I don’t really think this deserves its own top level grouping.

1 Like

https://github.com/discourse/discourse/commit/41c3941c4cf0caa13fe02c1d61cf7dd059b10d44#diff-74e2124f43157511de446b1deb7cb053

Thank you @eviltrout! Super useful for languages like Finnish. :+1:

11 Likes

There’s no way to use this with PM’s, right?

(There is potential in our group for someone to PM fraudulent instructions for wiring money, so we might watch for the words “wire” and “ABA”.)

I’d recommend adding those words to ‘flag’ as this covers both PMs and public topics.

3 Likes

This is not working for me. I’m testing by posting in a public category- not a PM. Blocking and Replacement work. Flagging and Require Approval do not work- the post appears immediately, and nothing shows up on the Review Queue.

How are you testing it? Some of these filters don’t apply to staff users (admins and moderators).

1 Like

I was testing as admin. It does work as expected for non-staff users. Also confirmed “flag” does work on PMs (for non-staff).

1 Like

[EDIT]: It does work if I follow the prompt and enter a replacement string of either “example” or “https://example.com”. But not with mixed or markdown. Is there any way to support mixed or markdown?


I’ve decided to use the “replace” action. I would like to replace a watched word with a url, so the watched word becomes a link to a warning. This seems like a nice solution because it doesn’t require moderator action.

But the replacement string does not get displayed as a link- just as raw markdown. Thinking that it might not be cooked properly, I tried “Rebuild HTML” and that had no effect.



1 Like

Posted the request in #marketplace.

1 Like

Hi all,
Looks like this is obvious, but for some reason I can’t find this Watched Words in my discourse instance:


Do I need to enable it somewhere? It’s missing currently. It’s a fresh install. I’m setting it up and wanted to apply some basic moderation settings, but I can’t find thi super useful feature…

Please help! My Discourse is 2.7, my own docker installation setup with your awesome guide.

Hello :wave:

The watched words are now located in admin > customise

cc @neil the image needs changing.

6 Likes

Thank you very much!

Image is updated, thank you.

2 Likes