1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Foundation
enum ModerationAction: Hashable {
case mute, block
}
enum ModerationWriteError: Error {
case rejected(String)
}
struct ModerationState: Equatable {
var isMuted = false
var blockURI: String?
var isBlocked: Bool { blockURI != nil }
}
enum ReportSubject: Hashable {
case account(String)
case post(uri: String, cid: String)
var retryKey: ReportRetryKey {
switch self {
case .account(let did): .account(did)
case .post(let uri, _): .post(uri)
}
}
}
enum ReportRetryKey: Hashable {
case account(String)
case post(String)
}