# blue.moji.richtext.facet

> Published by [moji.blue](https://lexicon.garden/identity/did:plc:kmzpsik7s5y5fwu7nnkngfx4)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:kmzpsik7s5y5fwu7nnkngfx4/blue.moji.richtext.facet)
- [Documentation](https://lexicon.garden/lexicon/did:plc:kmzpsik7s5y5fwu7nnkngfx4/blue.moji.richtext.facet/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:kmzpsik7s5y5fwu7nnkngfx4/blue.moji.richtext.facet/examples)

## Definitions

### `blue.moji.richtext.facet`

**Type**: `object`

SECURITY: did/name/formats/adultOnly/labels are all self-attested by the posting client at write time and are not re-validated by the PDS. Consumers that render an image from this facet without first verifying it against the referenced blue.moji.collection.item record (e.g. via an AppView's blue.moji.collection.getItem, hydrated from firehose-verified data) are trusting the poster to have told the truth about whose emoji it is, what it looks like, and whether it needs a content warning. In particular, adultOnly/labels here MUST NOT be trusted for moderation decisions — a poster could simply omit them to bypass a warning the source item's own record carries. Verified renderers should use the source item's adultOnly/labels instead. Renderers that skip verification SHOULD treat the facet as decorative/best-effort only, exactly as they would an unverified embed.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `alt` | `string` | No |  |
| `did` | `string` | Yes | DID of the user posting the Bluemoji. Self-attested; see security note on this object. |
| `name` | `string` | Yes | Name of the Bluemoji in :emoji: format |
| `labels` | `union` | No | Self-label values for this emoji. Effectively content warnings. Self-attested by the poster; see security note on this object. |
| `formats` | `union` | Yes | #formats_v0 is deprecated (see RFC 0001); writers MUST produce #formats_v1. |
| `adultOnly` | `boolean` | No | Self-attested by the poster; see security note on this object. Verified renderers SHOULD use the source item's adultOnly instead. |

### `blue.moji.richtext.facet#formats_v0`

**Type**: `object`

DEPRECATED, corresponds to blue.moji.collection.item#formats_v0. png/webp/gif are CIDs combinable with the facet's did to build a blob/CDN URL; apng_128/lottie are raw Bytes on the source record (not Blob) so are only marked present here as a boolean and require a com.atproto.repo.getRecord round-trip to render.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `lottie` | `boolean` | No |  |
| `gif_128` | `string` (cid) | No |  |
| `png_128` | `string` (cid) | No |  |
| `apng_128` | `boolean` | No |  |
| `webp_128` | `string` (cid) | No |  |

### `blue.moji.richtext.facet#formats_v1`

**Type**: `object`

Only the CID is provided; combine with the facet's did to construct a blob/CDN URL with no additional round-trip. All formats, including animated ones, are CIDs of Blob-typed values on the source record.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `lottie` | `string` (cid) | No |  |
| `gif_128` | `string` (cid) | No |  |
| `png_128` | `string` (cid) | No |  |
| `apng_128` | `string` (cid) | No |  |
| `webp_128` | `string` (cid) | No |  |

## Raw Schema

```json
{
  "id": "blue.moji.richtext.facet",
  "defs": {
    "main": {
      "type": "object",
      "required": [
        "did",
        "name",
        "formats"
      ],
      "properties": {
        "alt": {
          "type": "string"
        },
        "did": {
          "type": "string",
          "description": "DID of the user posting the Bluemoji. Self-attested; see security note on this object."
        },
        "name": {
          "type": "string",
          "description": "Name of the Bluemoji in :emoji: format"
        },
        "labels": {
          "refs": [
            "com.atproto.label.defs#selfLabels"
          ],
          "type": "union",
          "description": "Self-label values for this emoji. Effectively content warnings. Self-attested by the poster; see security note on this object."
        },
        "formats": {
          "refs": [
            "#formats_v0",
            "#formats_v1"
          ],
          "type": "union",
          "closed": false,
          "description": "#formats_v0 is deprecated (see RFC 0001); writers MUST produce #formats_v1."
        },
        "adultOnly": {
          "type": "boolean",
          "default": false,
          "description": "Self-attested by the poster; see security note on this object. Verified renderers SHOULD use the source item's adultOnly instead."
        }
      },
      "description": "SECURITY: did/name/formats/adultOnly/labels are all self-attested by the posting client at write time and are not re-validated by the PDS. Consumers that render an image from this facet without first verifying it against the referenced blue.moji.collection.item record (e.g. via an AppView's blue.moji.collection.getItem, hydrated from firehose-verified data) are trusting the poster to have told the truth about whose emoji it is, what it looks like, and whether it needs a content warning. In particular, adultOnly/labels here MUST NOT be trusted for moderation decisions — a poster could simply omit them to bypass a warning the source item's own record carries. Verified renderers should use the source item's adultOnly/labels instead. Renderers that skip verification SHOULD treat the facet as decorative/best-effort only, exactly as they would an unverified embed."
    },
    "formats_v0": {
      "type": "object",
      "properties": {
        "lottie": {
          "type": "boolean",
          "default": false
        },
        "gif_128": {
          "type": "string",
          "format": "cid"
        },
        "png_128": {
          "type": "string",
          "format": "cid"
        },
        "apng_128": {
          "type": "boolean",
          "default": false
        },
        "webp_128": {
          "type": "string",
          "format": "cid"
        }
      },
      "description": "DEPRECATED, corresponds to blue.moji.collection.item#formats_v0. png/webp/gif are CIDs combinable with the facet's did to build a blob/CDN URL; apng_128/lottie are raw Bytes on the source record (not Blob) so are only marked present here as a boolean and require a com.atproto.repo.getRecord round-trip to render."
    },
    "formats_v1": {
      "type": "object",
      "properties": {
        "lottie": {
          "type": "string",
          "format": "cid"
        },
        "gif_128": {
          "type": "string",
          "format": "cid"
        },
        "png_128": {
          "type": "string",
          "format": "cid"
        },
        "apng_128": {
          "type": "string",
          "format": "cid"
        },
        "webp_128": {
          "type": "string",
          "format": "cid"
        }
      },
      "description": "Only the CID is provided; combine with the facet's did to construct a blob/CDN URL with no additional round-trip. All formats, including animated ones, are CIDs of Blob-typed values on the source record."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
