A platform for community discussion. Free, open, simple.
DEV: Remove unused flag_type filter from the post_flag_created trigger
Régis Hanole1ad97c20d7c
diff --git a/plugins/automation/lib/discourse_automation/event_handlers.rb b/plugins/automation/lib/discourse_automation/event_handlers.rbindex a65797e15ed..832860e45b7 100644--- a/plugins/automation/lib/discourse_automation/event_handlers.rb+++ b/plugins/automation/lib/discourse_automation/event_handlers.rb@@ -441,11 +441,6 @@ module DiscourseAutomationDiscourseAutomation::Automation.where(trigger: name, enabled: true).find_each do |automation|- flag_type_field = automation.trigger_field("flag_type")- flag_type_id = flag_type_field["value"]-- next if flag_type_id.present? && flag_type_id != post_action.post_action_type_id-categories = automation.trigger_field("categories")["value"]next if categories.present? && !categories.include?(topic.category_id)