~ knotless Search/
↑↓ move↵ open⇧↵ all results

geesawra.industries/old-fella

Old people's social media app

0
1
main
32 lines · 617 B Raw History
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)
}