From d5f903781d809af034b8cd564b1d08cf5937696e Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sun, 21 May 2023 15:35:16 +0100 Subject: [PATCH] feat: add more specificity to report reasons --- crates/quark/src/models/safety/report.rs | 42 +++++++++++++++++++++--- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/crates/quark/src/models/safety/report.rs b/crates/quark/src/models/safety/report.rs index f9ee2a02..654f6d2f 100644 --- a/crates/quark/src/models/safety/report.rs +++ b/crates/quark/src/models/safety/report.rs @@ -1,3 +1,4 @@ +use iso8601_timestamp::Timestamp; use serde::{Deserialize, Serialize}; /// Reason for reporting content (message or server) @@ -6,16 +7,41 @@ pub enum ContentReportReason { /// No reason has been specified NoneSpecified, - /// Blatantly illegal content + /// Illegal content catch-all reason Illegal, + /// Selling or facilitating use of drugs or other illegal goods + IllegalGoods, + + /// Extortion or blackmail + IllegalExtortion, + + /// Revenge or child pornography + IllegalPornography, + + /// Illegal hacking activity + IllegalHacking, + + /// Extreme violence, gore, or animal cruelty + /// With exception to violence potrayed in media / creative arts + ExtremeViolence, + /// Content that promotes harm to others / self PromotesHarm, + /// Unsolicited advertisements + UnsolicitedSpam, + + /// This is a raid + Raid, + /// Spam or platform abuse SpamAbuse, - /// Distribution of malware + /// Scams or fraud + ScamsFraud, + + /// Distribution of malware or malicious links Malware, /// Harassment or abuse targeted at another user @@ -28,6 +54,9 @@ pub enum UserReportReason { /// No reason has been specified NoneSpecified, + /// Unsolicited advertisements + UnsolicitedSpam, + /// User is sending spam or otherwise abusing the platform SpamAbuse, @@ -68,6 +97,8 @@ pub enum ReportedContent { id: String, /// Reason for reporting a user report_reason: UserReportReason, + /// Message context + message_id: Option, }, } @@ -79,10 +110,13 @@ pub enum ReportStatus { Created {}, /// Report was rejected - Rejected { rejection_reason: String }, + Rejected { + rejection_reason: String, + closed_at: Option, + }, /// Report was actioned and resolved - Resolved {}, + Resolved { closed_at: Option }, } /// User-generated platform moderation report.