mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
FEATURE: Post created/edited trigger can skip posts created via email (#28615)
This commit is contained in:
@ -23,6 +23,11 @@ module DiscourseAutomation
|
||||
next if post.user.user_stat.topic_count != 1
|
||||
end
|
||||
|
||||
skip_via_email = automation.trigger_field("skip_via_email")
|
||||
if skip_via_email["value"]
|
||||
next if post.via_email?
|
||||
end
|
||||
|
||||
valid_trust_levels = automation.trigger_field("valid_trust_levels")
|
||||
if valid_trust_levels["value"]
|
||||
next if valid_trust_levels["value"].exclude?(post.user.trust_level)
|
||||
|
Reference in New Issue
Block a user