mirror of
https://github.com/discourse/discourse.git
synced 2025-06-10 17:23:49 +08:00
DEV: add extra safety around original post only implementation (#32521)
Instead of looking at post count that is cached, only ever look at the post_number which is guaranteed to be correct
This commit is contained in:
@ -34,7 +34,7 @@ module DiscourseAutomation
|
||||
|
||||
original_post_only = automation.trigger_field("original_post_only")
|
||||
if original_post_only["value"]
|
||||
next if topic.posts_count > 1
|
||||
next if post.post_number != 1
|
||||
end
|
||||
|
||||
first_post_only = automation.trigger_field("first_post_only")
|
||||
|
Reference in New Issue
Block a user