DomainBlock

public struct DomainBlock : Codable, Hashable

Represents a domain limited from federating.

  • id

    The ID of the DomainBlock in the database.

    Declaration

    Swift

    public var id: String?
  • The domain that is not allowed to federate.

    Declaration

    Swift

    public var domain: String
  • When the domain was blocked from federating.

    Declaration

    Swift

    public var createdAt: Date?
  • The policy to be applied by this domain block.

    Declaration

    Swift

    public var severity: DomainBlockSeverity?
  • Whether to reject media attachments from this domain

    Declaration

    Swift

    public var rejectMedia: Bool?
  • Whether to reject reports from this domain

    Declaration

    Swift

    public var rejectReports: Bool?
  • A private note about this domain block, visible only to admins.

    Declaration

    Swift

    public var privateComment: String?
  • public note about this domain block, optionally shown on the about page.

    Declaration

    Swift

    public var publicComment: String?
  • Whether to partially censor the domain when shown in public. Defaults to false

    Declaration

    Swift

    public var obfuscate: Bool
  • Declaration

    Swift

    public init(id: String?,
                domain: String,
                createdAt: Date?,
                severity: DomainBlockSeverity?,
                rejectMedia: Bool?,
                rejectReports: Bool?,
                privateComment: String? = nil,
                publicComment: String? = nil,
                obfuscate: Bool = false)

    Parameters

    id

    The ID of the DomainBlock in the database.

    domain

    The domain that is not allowed to federate.

    createdAt

    When the domain was blocked from federating.

    severity

    The policy to be applied by this domain block.

    rejectMedia

    The policy to be applied by this domain block.

    rejectReports

    Whether to reject reports from this domain

    privateComment

    A private note about this domain block, visible only to admins.

    publicComment

    public note about this domain block, optionally shown on the about page.

    obfuscate

    Whether to partially censor the domain when shown in public. Defaults to false