feat(spam): Introduce checking new accounts, events & comments for spam with the help of Akismet

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-01-31 19:35:29 +01:00
parent 1db5c4ae2d
commit 317a3434b2
83 changed files with 7186 additions and 2394 deletions

View File

@@ -57,6 +57,11 @@ defmodule Mobilizon.GraphQL.Schema.ReportType do
value(:resolved, description: "The report has been marked as resolved")
end
enum :anti_spam_feedback do
value(:ham, description: "The report is ham")
value(:spam, description: "The report is spam")
end
object :report_queries do
@desc "Get all reports"
field :reports, :paginated_report_list do
@@ -103,6 +108,11 @@ defmodule Mobilizon.GraphQL.Schema.ReportType do
field :update_report_status, type: :report do
arg(:report_id, non_null(:id), description: "The report's ID")
arg(:status, non_null(:report_status), description: "The report's new status")
arg(:antispam_feedback, :anti_spam_feedback,
description: "The feedback to send to the anti-spam system"
)
resolve(&Report.update_report/3)
end