mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-19 05:59:26 +08:00
under rare conditions spam scanning can be mis-attributed and apply to author when an editor edited it.
16 lines
354 B
Ruby
Vendored
16 lines
354 B
Ruby
Vendored
# 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,
|
|
triggering_user_id: args[:triggering_user_id],
|
|
)
|
|
end
|
|
end
|
|
end
|