# social.coves.community.comment.defs

> 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.defs)
- [Documentation](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.comment.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.comment.defs/examples)

## Definitions

### `social.coves.community.comment.defs#postRef`

**Type**: `object`

Reference to a post record

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes | CID of the post record |
| `uri` | `string` (at-uri) | Yes | AT-URI of the post |

### `social.coves.community.comment.defs#commentRef`

**Type**: `object`

Reference to a comment record

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes | CID of the comment record |
| `uri` | `string` (at-uri) | Yes | AT-URI of the comment |

### `social.coves.community.comment.defs#commentView`

**Type**: `object`

Base view for a single comment with voting, stats, and viewer state

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes | CID of the comment record |
| `uri` | `string` (at-uri) | Yes | AT-URI of the comment record |
| `post` | `ref` → `#postRef` | Yes | Reference to the parent post |
| `embed` | `union` | No | Embedded content from the comment record (images or quoted post). The AppView may transform blob references into fetchable URLs and enrich quoted posts with a resolved view. |
| `stats` | `ref` → `#commentStats` | Yes | Comment statistics (votes, replies) |
| `author` | `ref` → `social.coves.community.post.defs#authorView` | Yes | Comment author information |
| `parent` | `ref` → `#commentRef` | No | Reference to parent comment if this is a nested reply |
| `record` | `unknown` | Yes | The actual comment record verbatim |
| `viewer` | `ref` → `#commentViewerState` | No | Viewer-specific state (vote, saved, etc.) |
| `createdAt` | `string` (datetime) | Yes | When the comment was created |
| `indexedAt` | `string` (datetime) | Yes | When this comment was indexed by the AppView |

### `social.coves.community.comment.defs#commentStats`

**Type**: `object`

Statistics for a comment

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `score` | `integer` | Yes | Calculated score (upvotes - downvotes) |
| `upvotes` | `integer` | Yes | Number of upvotes |
| `downvotes` | `integer` | Yes | Number of downvotes |
| `replyCount` | `integer` | Yes | Number of direct replies to this comment |

### `social.coves.community.comment.defs#blockedComment`

**Type**: `object`

Comment is blocked due to viewer blocking author or moderation action

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | AT-URI of the blocked comment |
| `blocked` | `boolean` | Yes | Always true for blocked comments |
| `blockedBy` | `string` | No | What caused the block: viewer blocked author, or comment was removed by moderators |

### `social.coves.community.comment.defs#notFoundComment`

**Type**: `object`

Comment was not found (deleted, never indexed, or invalid URI)

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | AT-URI of the missing comment |
| `notFound` | `boolean` | Yes | Always true for not found comments |

### `social.coves.community.comment.defs#threadViewComment`

**Type**: `object`

Wrapper for threaded comment structure, similar to Bluesky's threadViewPost pattern

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `comment` | `ref` → `#commentView` | Yes | The comment itself |
| `hasMore` | `boolean` | No | True if more replies exist but are not included in this response |
| `replies` | `array` | No | Nested replies to this comment |

### `social.coves.community.comment.defs#commentViewerState`

**Type**: `object`

Viewer-specific state for a comment

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `vote` | `string` | No | Viewer's vote on this comment |
| `voteUri` | `string` (at-uri) | No | AT-URI of the viewer's vote record |

## Raw Schema

```json
{
  "id": "social.coves.community.comment.defs",
  "defs": {
    "postRef": {
      "type": "object",
      "required": [
        "uri",
        "cid"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid",
          "description": "CID of the post record"
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the post"
        }
      },
      "description": "Reference to a post record"
    },
    "commentRef": {
      "type": "object",
      "required": [
        "uri",
        "cid"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid",
          "description": "CID of the comment record"
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the comment"
        }
      },
      "description": "Reference to a comment record"
    },
    "commentView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "author",
        "record",
        "post",
        "createdAt",
        "indexedAt",
        "stats"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid",
          "description": "CID of the comment record"
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the comment record"
        },
        "post": {
          "ref": "#postRef",
          "type": "ref",
          "description": "Reference to the parent post"
        },
        "embed": {
          "refs": [
            "social.coves.embed.images",
            "social.coves.embed.post"
          ],
          "type": "union",
          "description": "Embedded content from the comment record (images or quoted post). The AppView may transform blob references into fetchable URLs and enrich quoted posts with a resolved view."
        },
        "stats": {
          "ref": "#commentStats",
          "type": "ref",
          "description": "Comment statistics (votes, replies)"
        },
        "author": {
          "ref": "social.coves.community.post.defs#authorView",
          "type": "ref",
          "description": "Comment author information"
        },
        "parent": {
          "ref": "#commentRef",
          "type": "ref",
          "description": "Reference to parent comment if this is a nested reply"
        },
        "record": {
          "type": "unknown",
          "description": "The actual comment record verbatim"
        },
        "viewer": {
          "ref": "#commentViewerState",
          "type": "ref",
          "description": "Viewer-specific state (vote, saved, etc.)"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the comment was created"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When this comment was indexed by the AppView"
        }
      },
      "description": "Base view for a single comment with voting, stats, and viewer state"
    },
    "commentStats": {
      "type": "object",
      "required": [
        "upvotes",
        "downvotes",
        "score",
        "replyCount"
      ],
      "properties": {
        "score": {
          "type": "integer",
          "description": "Calculated score (upvotes - downvotes)"
        },
        "upvotes": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of upvotes"
        },
        "downvotes": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of downvotes"
        },
        "replyCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of direct replies to this comment"
        }
      },
      "description": "Statistics for a comment"
    },
    "blockedComment": {
      "type": "object",
      "required": [
        "uri",
        "blocked"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the blocked comment"
        },
        "blocked": {
          "type": "boolean",
          "const": true,
          "description": "Always true for blocked comments"
        },
        "blockedBy": {
          "type": "string",
          "maxLength": 64,
          "description": "What caused the block: viewer blocked author, or comment was removed by moderators",
          "knownValues": [
            "author",
            "moderator"
          ]
        }
      },
      "description": "Comment is blocked due to viewer blocking author or moderation action"
    },
    "notFoundComment": {
      "type": "object",
      "required": [
        "uri",
        "notFound"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the missing comment"
        },
        "notFound": {
          "type": "boolean",
          "const": true,
          "description": "Always true for not found comments"
        }
      },
      "description": "Comment was not found (deleted, never indexed, or invalid URI)"
    },
    "threadViewComment": {
      "type": "object",
      "required": [
        "comment"
      ],
      "properties": {
        "comment": {
          "ref": "#commentView",
          "type": "ref",
          "description": "The comment itself"
        },
        "hasMore": {
          "type": "boolean",
          "description": "True if more replies exist but are not included in this response"
        },
        "replies": {
          "type": "array",
          "items": {
            "refs": [
              "#threadViewComment",
              "#notFoundComment",
              "#blockedComment"
            ],
            "type": "union"
          },
          "description": "Nested replies to this comment"
        }
      },
      "description": "Wrapper for threaded comment structure, similar to Bluesky's threadViewPost pattern"
    },
    "commentViewerState": {
      "type": "object",
      "properties": {
        "vote": {
          "type": "string",
          "maxLength": 64,
          "description": "Viewer's vote on this comment",
          "knownValues": [
            "up",
            "down"
          ]
        },
        "voteUri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the viewer's vote record"
        }
      },
      "description": "Viewer-specific state for a comment"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
