FEATURE: auto_action_type field for flags (#29306)

Allow admins to specify if the flag should be `auto_action_type`. If yes, then when an admin flags a post,  it is automatically actioned.

Meta: https://meta.discourse.org/t/allow-creation-of-custom-flags-which-auto-hide-content-similar-to-spam-and-inapproriate/329894
This commit is contained in:
Krzysztof Kotlarek
2024-10-22 10:56:31 +11:00
committed by GitHub
parent 08911eac8f
commit 644e6c7f46
8 changed files with 60 additions and 6 deletions

View File

@ -12,7 +12,8 @@ class FlagSerializer < ApplicationSerializer
:enabled,
:is_flag,
:applies_to,
:is_used
:is_used,
:auto_action_type
def i18n_prefix
"#{@options[:target] || "post_action"}_types.#{object.name_key}"