discourse/app/jobs/regular/post_alert.rb
2017-06-12 17:00:27 +09:00

12 lines
280 B
Ruby

module Jobs
class PostAlert < Jobs::Base
def execute(args)
# maybe it was removed by the time we are making the post
post = Post.where(id: args[:post_id]).first
PostAlerter.post_created(post, args[:options] || {}) if post && post.topic
end
end
end