diff --git a/app/models/post.rb b/app/models/post.rb index 940cb17cf10..3a6a8d51591 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -498,6 +498,7 @@ class Post < ActiveRecord::Base args[:image_sizes] = image_sizes if image_sizes.present? args[:invalidate_oneboxes] = true if invalidate_oneboxes.present? Jobs.enqueue(:process_post, args) + DiscourseEvent.trigger(:after_trigger_post_process, self) end def self.public_posts_count_per_day(start_date, end_date, category_id=nil) diff --git a/spec/components/post_creator_spec.rb b/spec/components/post_creator_spec.rb index 955663e4d25..0595a66e007 100644 --- a/spec/components/post_creator_spec.rb +++ b/spec/components/post_creator_spec.rb @@ -75,6 +75,7 @@ describe PostCreator do DiscourseEvent.expects(:trigger).with(:post_created, anything, anything, user).once DiscourseEvent.expects(:trigger).with(:after_validate_topic, anything, anything).once DiscourseEvent.expects(:trigger).with(:before_create_topic, anything, anything).once + DiscourseEvent.expects(:trigger).with(:after_trigger_post_process, anything).once creator.create end