{
  "$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
}
