Report.swift (1124B)
1 // 2 // Report.swift 3 // damus 4 // 5 // Created by William Casarin on 2023-01-24. 6 // 7 8 import Foundation 9 10 enum ReportType: String, CustomStringConvertible, CaseIterable { 11 case spam 12 case nudity 13 case profanity 14 case illegal 15 case impersonation 16 17 var description: String { 18 switch self { 19 case .spam: 20 return NSLocalizedString("Spam", comment: "Description of report type for spam.") 21 case .nudity: 22 return NSLocalizedString("Nudity", comment: "Description of report type for nudity.") 23 case .profanity: 24 return NSLocalizedString("Profanity", comment: "Description of report type for profanity.") 25 case .illegal: 26 return NSLocalizedString("Illegal Content", comment: "Description of report type for illegal content.") 27 case .impersonation: 28 return NSLocalizedString("Impersonation", comment: "Description of report type for impersonation.") 29 } 30 } 31 } 32 33 struct ReportNoteTarget { 34 let pubkey: Pubkey 35 let note_id: NoteId 36 } 37 38 enum ReportTarget { 39 case user(Pubkey) 40 case note(ReportNoteTarget) 41 } 42