FIX: Replace use of auto_silence_first_post_regex with watched words (PR #12585)

This is another attempt at moving auto_silence_first_post_regex to watched words page. We tried to do this before in another tab, but the user experience was not great. This tries to use existing logic and add a ‘first_post_only’ flag to watched words.

For now, this flag can be used only for ‘require approval’ watched words.

GitHub

Since this setting is a regexp, shouldn’t we also enable the watched words regular expressions as well?

We might want to do it only if there was a value in the first place though.

this is such a tricky change.

Maybe we should do it in 2 phases.

  1. we get the new functionality into watched words
  2. after living with it for a bit we get rid of the site setting

screenshot of the new UI?

I have second thoughts about this and think it is too complex for the benefits it brings. I still think that we should move from the regex site setting, but we can just introduce a new watched word “Silence” with a description like “First posts of users containing these words will require approval by staff before they can be seen and the user will be automatically silenced”.

Even the terminology of “first post only” is a bit confusing because it may suggest that those with “first post only = false” will apply only to second, third, etc. posts, which is not true. They still apply to first post and this is needed to replicate the existing functionality (first_post_only = true → only the first post, first_post_only = false → all posts).