# social.coves.community.comment

> Published by [coves.social](https://lexicon.garden/identity/did:web:coves.social)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.comment)
- [Documentation](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.comment/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.comment/examples)

## Definitions

### `social.coves.community.comment`

**Type**: `record`

A comment on a post or another comment. Comments live in user repositories and support nested threading.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `embed` | `union` | No | Embedded media or quoted posts |
| `langs` | `array` | No | Languages used in the comment content (ISO 639-1) |
| `reply` | `ref` → `#replyRef` | Yes | Reference to the post and parent being replied to |
| `facets` | `array` | No | Annotations for rich text (mentions, links, formatting, block structure) |
| `labels` | `ref` → `com.atproto.label.defs#selfLabels` | No | Self-applied content labels |
| `content` | `string` | Yes | Comment text content |
| `createdAt` | `string` (datetime) | Yes | Timestamp of comment creation |
| `bridgedStats` | `ref` → `#bridgedStats` | No | Bridge-asserted aggregate of origin-platform votes for federated/bridged content. Set by the bridge that materialized this record; absent for natively-authored comments. |

### `social.coves.community.comment#replyRef`

**Type**: `object`

References for maintaining thread structure. Root always points to the original post, parent points to the immediate parent (post or comment).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `root` | `ref` → `com.atproto.repo.strongRef` | Yes | Strong reference to the original post that started the thread |
| `parent` | `ref` → `com.atproto.repo.strongRef` | Yes | Strong reference to the immediate parent (post or comment) being replied to |

### `social.coves.community.comment#bridgedStats`

**Type**: `object`

Aggregate vote counts asserted by the bridge for content federated from an origin platform (e.g. Lemmy). These supplement, and are kept separate from, native atproto votes.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `asOf` | `string` (datetime) | Yes | Timestamp the origin-platform counts were sampled; used to discard stale updates |
| `upvotes` | `integer` | Yes | Number of upvotes on the origin platform as of asOf |
| `downvotes` | `integer` | Yes | Number of downvotes on the origin platform as of asOf |

## Raw Schema

```json
{
  "id": "social.coves.community.comment",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "reply",
          "content",
          "createdAt"
        ],
        "properties": {
          "embed": {
            "refs": [
              "social.coves.embed.images",
              "social.coves.embed.post"
            ],
            "type": "union",
            "description": "Embedded media or quoted posts"
          },
          "langs": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "language"
            },
            "maxLength": 3,
            "description": "Languages used in the comment content (ISO 639-1)"
          },
          "reply": {
            "ref": "#replyRef",
            "type": "ref",
            "description": "Reference to the post and parent being replied to"
          },
          "facets": {
            "type": "array",
            "items": {
              "ref": "social.coves.richtext.facet",
              "type": "ref"
            },
            "maxLength": 200,
            "description": "Annotations for rich text (mentions, links, formatting, block structure)"
          },
          "labels": {
            "ref": "com.atproto.label.defs#selfLabels",
            "type": "ref",
            "description": "Self-applied content labels"
          },
          "content": {
            "type": "string",
            "maxLength": 100000,
            "description": "Comment text content",
            "maxGraphemes": 10000
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp of comment creation"
          },
          "bridgedStats": {
            "ref": "#bridgedStats",
            "type": "ref",
            "description": "Bridge-asserted aggregate of origin-platform votes for federated/bridged content. Set by the bridge that materialized this record; absent for natively-authored comments."
          }
        }
      },
      "description": "A comment on a post or another comment. Comments live in user repositories and support nested threading."
    },
    "replyRef": {
      "type": "object",
      "required": [
        "root",
        "parent"
      ],
      "properties": {
        "root": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref",
          "description": "Strong reference to the original post that started the thread"
        },
        "parent": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref",
          "description": "Strong reference to the immediate parent (post or comment) being replied to"
        }
      },
      "description": "References for maintaining thread structure. Root always points to the original post, parent points to the immediate parent (post or comment)."
    },
    "bridgedStats": {
      "type": "object",
      "required": [
        "upvotes",
        "downvotes",
        "asOf"
      ],
      "properties": {
        "asOf": {
          "type": "string",
          "format": "datetime",
          "description": "Timestamp the origin-platform counts were sampled; used to discard stale updates"
        },
        "upvotes": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of upvotes on the origin platform as of asOf"
        },
        "downvotes": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of downvotes on the origin platform as of asOf"
        }
      },
      "description": "Aggregate vote counts asserted by the bridge for content federated from an origin platform (e.g. Lemmy). These supplement, and are kept separate from, native atproto votes."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
