discourse-ai/app/jobs/regular/ai_spam_scan.rb

14 lines
282 B
Ruby
Raw Permalink Normal View History

2024-12-11 17:17:25 -05:00
# frozen_string_literal: true
module Jobs
class AiSpamScan < ::Jobs::Base
def execute(args)
return if !args[:post_id]
post = Post.find_by(id: args[:post_id])
return if !post
DiscourseAi::AiModeration::SpamScanner.perform_scan(post)
end
end
end