mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 05:11:20 +08:00
FEATURE: Add 'New users only' option to user_updated trigger (#26648)
This commit adds a new option to the `user_updated` trigger of the automation plugin to only trigger an automation for new users that join after the automation is enabled. Internal topic: t/125829/9.
This commit is contained in:
@ -8,6 +8,7 @@ DiscourseAutomation::Triggerable.add(DiscourseAutomation::Triggers::USER_UPDATED
|
||||
field :custom_fields, component: :custom_fields
|
||||
field :user_profile, component: :user_profile
|
||||
field :once_per_user, component: :boolean
|
||||
field :new_users_only, component: :boolean
|
||||
|
||||
validate do
|
||||
has_triggers = has_trigger_field?(:custom_fields) && has_trigger_field?(:user_profile)
|
||||
|
Reference in New Issue
Block a user