Labels

All about moderation labels

About labels

Moderation in Atproto consists of multiple, stackable systems, including:

  1. Network takedowns which filter the content from the APIs
  2. Labels placed on content by moderation services
  3. User controls such as mutes and blocks

Developers building client applications should understand how to apply labels and user controls.

Labels are a form of metadata about any account or content in the AT ecosystem. Labels are published by moderation services, which are either hardcoded into the application or chosen by the user. They are attached to records in the responses under the labels key.

A label is published with the following information:

{
  /** DID of the actor who created this label. */
  src: string
  /** AT URI of the record, repository (account), or other resource that this label applies to. */
  uri: string
  /** Optionally, CID specifying the specific version of 'uri' resource this label applies to. */
  cid?: string
  /** The short string name of the value or type of this label. */
  val: string
  /** If true, this is a negation label, overwriting a previous label. */
  neg?: boolean
  /** Timestamp when this label was created. */
  cts: string
}

Label values

The value of a label will determine its behavior. Some example label values are porn, gore, and spam.

Label values are strings. They currently must only be lowercase a-z or a dash character ^[a-z-]+$. Some of them start with !, but that can only be used by global label values.

Label values are interpreted by their definitions. Those definitions include these attributes:

  • blurs which may be content or media or none
  • severity which may be alert or inform or none
  • defaultSetting which may be hide or warn or ignore
  • adultOnly which is boolean

There are other definition attributes, but they are only used by the global label values.

Global label values

There are a few label values which are defined by the protocol. They are:

  • !hide which puts a generic warning on content that cannot be clicked through, and filters the content from listings. Not configurable by the user.
  • !warn which puts a generic warning on content but can be clicked through. Not configurable by the user.
  • !no-unauthenticated which makes the content inaccessible to logged-out users in applications which respect the label.
  • porn which puts a warning on images and can only be clicked through if the user is 18+ and has enabled adult content.
  • sexual which behaves like porn but is meant to handle less intense sexual content.
  • graphic-media which behaves like porn but is for violence / gore.
  • nudity which puts a warning on images but isn't 18+ and defaults to ignore.

There are two reasons global label values exist.

The first is because only label values which are defined globally can be used as self-labels (ie set by a user who is not a Labeler). The porn, sexual, gore, nudity, and !no-unauthenticated labels are global for this reason.

The second is because some special behaviors, like "non-configurable" and "applies only to logged out users," cannot be applied to custom labels. The !hide, !warn, and !no-unauthenticated labels are global for this reason.

Custom label values

Labelers may define their own label values. Every Labeler has its own namespace of label values it defines. Custom definitions can override all global definitions for the defining Labeler except for the ones that start with a !, because those are reserved.

Since there are two behavior attributes (blurs and severity) with three values each, there are 9 possible behaviors for custom label values.

BlursSeverityDescription
contentalertHide the content and put a "danger" warning label on the content if viewed
contentinformHide the content and put a "neutral" information label on the content if viewed
contentnoneHide the content
mediaalertHide images in the content and put a "danger" warning label on the content if viewed
mediainformHide images in the content and put a "neutral" information label on the content if viewed
medianoneHide images in the content
nonealertPut a "danger" warning label on the content
noneinformPut a "neutral" information label on the content
nonenoneNo visual effect

Some examples of the definitions you might use for a label

  • Harassment: blurs=content + severity=alert
  • Spider warning: blurs=media + severity=alert
  • Misinformation: blurs=none + severity=alert
  • Verified user: blurs=none + severity=inform
  • Curational down-regulate: blurs=none + severity=none

The defaultSetting establishes how the label will be configured when the user first subscribes to the labeler.

The adultOnly establishes whether the label should be configurable if adult content is disabled.

Label configuration

A user may choose to hide, warn, or ignore each label from a labeler. Hiding and warning are basically similar, except that hide will also filter the labeled content from feeds and listings. Ignore just ignores the label. If adult content is not enabled in preferences, the behavior should force to hide with no override.

For more information, see the Labels spec.

Further Reading and Resources