mirror of
https://github.com/discourse/discourse.git
synced 2024-12-17 18:33:53 +08:00
14 lines
315 B
Ruby
14 lines
315 B
Ruby
require_dependency 'post_alerter'
|
|
|
|
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
|