mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 21:41:26 +08:00
FEATURE: add trigger_with_pms
option to topic tags changed
automation trigger (#29122)
This commit is contained in:
@ -224,6 +224,10 @@ module DiscourseAutomation
|
||||
DiscourseAutomation::Automation
|
||||
.where(trigger: name, enabled: true)
|
||||
.find_each do |automation|
|
||||
if topic.private_message?
|
||||
next if !automation.trigger_field("trigger_with_pms")["value"]
|
||||
end
|
||||
|
||||
watching_categories = automation.trigger_field("watching_categories")
|
||||
if watching_categories["value"]
|
||||
next if !watching_categories["value"].include?(topic.category_id)
|
||||
|
Reference in New Issue
Block a user