Report

final class Report : Model

Twit-arr moderation relies in part on user-submitted reports of content and/or behavior which does not conform to community standards. A Report can be submitted for Moderator review on any of: an individual Twarrt or ForumPost, an entire Forum, a FezPost, or a User (such as for general behavioral pattern, or their profile contents).

The .submitterID is always the user’s primary user ID. An individual post can only be reported once per primary user. There is no per user restriction on the number of reports of a particular Forum or User.

The .reportedID field is a string value, because the entity being reported may have either a UUID or an integer based ID, which is determined via the .reportType.

The lifecycle flow of Reports is:

  • Created by submitter
  • Viewed by a moderator in a list of open reports
  • Moderator takes the report (handledBy is set to the moderator’s UUID). Other mods should be able to see the report is being handled.
  • Moderator modifies content, quarantines content, warns user, bans user, or takes some other action.
  • Moderator fills in actionTaken field and closes the report.

Properties

  • id

    The report’s ID.

    Declaration

    Swift

    @ID
    var id: UUID?
  • The type of entity reported.

    Declaration

    Swift

    @Field
    var reportType: ReportType
  • The ID of the entity reported. Could resolve to an Int or a UUID, depending on the value ofreportType.

    Declaration

    Swift

    @Field
    var reportedID: String
  • An optional message from the submitter.

    Declaration

    Swift

    @Field
    var submitterMessage: String
  • Set to a new UUID() when a Moderator starts handling one or more reports. Any mod actions the mod takes until these reports are closed get tagged with this UUID. Reports may be closed without ever setting an action group.

    Declaration

    Swift

    @OptionalField
    var actionGroup: UUID?
  • The status of the report.

    Declaration

    Swift

    @Field
    var isClosed: Bool
  • Timestamp of the model’s creation, set automatically.

    Declaration

    Swift

    @Timestamp
    var createdAt: Date?
  • Timestamp of the model’s last update, set automatically.

    Declaration

    Swift

    @Timestamp
    var updatedAt: Date?

Relations

Initializaton