mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 23:48:44 +08:00
FIX: don't trigger topic_created
event for reply posts via email. (#15485)
Previously, we incorrectly triggered `topic_created` events when the posts are created via email since we didn't check the post number.
This commit is contained in:
@ -1308,7 +1308,7 @@ module Email
|
||||
import_mode: options[:import_mode],
|
||||
post_alert_options: options[:post_alert_options]
|
||||
).enqueue_jobs
|
||||
DiscourseEvent.trigger(:topic_created, result.post.topic, options, user)
|
||||
DiscourseEvent.trigger(:topic_created, result.post.topic, options, user) if result.post.is_first_post?
|
||||
DiscourseEvent.trigger(:post_created, result.post, options, user)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user