# ca.astronomi.boards.comment

> A comment on a topic (or a reply to another comment), stored in the commenter's own repo.

- Kind: record
- Record key: tid
- Authority: boards.astronomi.ca
- Lexicon: 1
- Published by [cosm.blue](https://lexicon.garden/identity/did:plc:rnn63n5auoexnihjf7zllr6l), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:rnn63n5auoexnihjf7zllr6l/ca.astronomi.boards.comment)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:rnn63n5auoexnihjf7zllr6l/ca.astronomi.boards.comment/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:rnn63n5auoexnihjf7zllr6l/ca.astronomi.boards.comment/analytics)

## Record (`ca.astronomi.boards.comment`)

Type: record · key tid

### Properties

- `createdAt` (string · datetime, required)
- `media` (array): Images attached to the reply, stored as blobs in the author's repo.
  - `items` (ref)
    - Reference: `#mediaItem`
- `parent` (ref): Set when replying to another comment.
  - Reference: `ca.astronomi.boards.defs#strongRef`
- `post` (ref, required): The topic this comment belongs to.
  - Reference: `ca.astronomi.boards.defs#strongRef`
- `text` (string, required): Body text; may contain the site's sanitized subset of HTML.
  - Constraints: maxLength: 50000, maxGraphemes: 5000
- `updatedAt` (string · datetime)

## #mediaItem (`ca.astronomi.boards.comment#mediaItem`)

Type: object

### Properties

- `alt` (string, required)
  - Constraints: maxLength: 2000, maxGraphemes: 1000
- `image` (blob, required)
  - Constraints: maxSize: 52428800, accept: image/png, image/jpeg, image/webp, image/gif, image/avif

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A comment on a topic (or a reply to another comment), stored in the commenter's own repo.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "media": {
            "description": "Images attached to the reply, stored as blobs in the author's repo.",
            "items": {
              "ref": "#mediaItem",
              "type": "ref"
            },
            "maxItems": 4,
            "type": "array"
          },
          "parent": {
            "description": "Set when replying to another comment.",
            "ref": "ca.astronomi.boards.defs#strongRef",
            "type": "ref"
          },
          "post": {
            "description": "The topic this comment belongs to.",
            "ref": "ca.astronomi.boards.defs#strongRef",
            "type": "ref"
          },
          "text": {
            "description": "Body text; may contain the site's sanitized subset of HTML.",
            "maxGraphemes": 5000,
            "maxLength": 50000,
            "type": "string"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "post",
          "text",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "mediaItem": {
      "properties": {
        "alt": {
          "maxGraphemes": 1000,
          "maxLength": 2000,
          "type": "string"
        },
        "image": {
          "accept": [
            "image/png",
            "image/jpeg",
            "image/webp",
            "image/gif",
            "image/avif"
          ],
          "maxSize": 52428800,
          "type": "blob"
        }
      },
      "required": [
        "image",
        "alt"
      ],
      "type": "object"
    }
  },
  "id": "ca.astronomi.boards.comment",
  "lexicon": 1
}
```
