mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-02-14 07:24:51 +00:00
20 lines
405 B
Ruby
20 lines
405 B
Ruby
# frozen_string_literal: true
|
|
|
|
module ::DiscourseAI
|
|
class PostClassification < Classification
|
|
private
|
|
|
|
def flag!(post, classification_type)
|
|
PostActionCreator.new(
|
|
flagger,
|
|
post,
|
|
PostActionType.types[:inappropriate],
|
|
reason: classification_type,
|
|
queue_for_review: true,
|
|
).perform
|
|
|
|
post.publish_change_to_clients! :acted
|
|
end
|
|
end
|
|
end
|