# com.cruftmanor.waystation.message

> A chat message, written into the author's own repo in a Waystation space.

- Kind: record
- Record key: tid
- Authority: waystation.cruftmanor.com
- Lexicon: 1
- Published by [clockworkconductor.spaces-alpha.bsky.network](https://lexicon.garden/identity/did:plc:e2fj77s3rygus52me3ul6qka), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e2fj77s3rygus52me3ul6qka/com.cruftmanor.waystation.message)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e2fj77s3rygus52me3ul6qka/com.cruftmanor.waystation.message/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e2fj77s3rygus52me3ul6qka/com.cruftmanor.waystation.message/analytics)

## Record (`com.cruftmanor.waystation.message`)

Type: record · key tid

### Properties

- `attachment` (ref)
  - Reference: `#attachment`
- `createdAt` (string · datetime, required)
- `text` (string, required): Message text. May be empty when an attachment is present.
  - Constraints: maxLength: 10000, maxGraphemes: 1000

## #attachment (`com.cruftmanor.waystation.message#attachment`)

Type: object

One file attached to a message. Images are shown inline; PDFs are offered as downloads.

### Properties

- `file` (blob, required)
  - Constraints: maxSize: 12582912, accept: image/png, image/jpeg, image/gif, image/webp, application/pdf
- `height` (integer): Images only: height in pixels, as displayed.
  - Constraints: minimum: 1, maximum: 100000
- `name` (string): Original file name, for display and download.
  - Constraints: maxLength: 1000, maxGraphemes: 200
- `thumb` (blob): Images only: a smaller copy shown in the chat; the full file opens on request.
  - Constraints: maxSize: 262144, accept: image/webp, image/jpeg, image/png
- `width` (integer): Images only: width in pixels, as displayed.
  - Constraints: minimum: 1, maximum: 100000

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "attachment": {
      "description": "One file attached to a message. Images are shown inline; PDFs are offered as downloads.",
      "properties": {
        "file": {
          "accept": [
            "image/png",
            "image/jpeg",
            "image/gif",
            "image/webp",
            "application/pdf"
          ],
          "maxSize": 12582912,
          "type": "blob"
        },
        "height": {
          "description": "Images only: height in pixels, as displayed.",
          "maximum": 100000,
          "minimum": 1,
          "type": "integer"
        },
        "name": {
          "description": "Original file name, for display and download.",
          "maxGraphemes": 200,
          "maxLength": 1000,
          "type": "string"
        },
        "thumb": {
          "accept": [
            "image/webp",
            "image/jpeg",
            "image/png"
          ],
          "description": "Images only: a smaller copy shown in the chat; the full file opens on request.",
          "maxSize": 262144,
          "type": "blob"
        },
        "width": {
          "description": "Images only: width in pixels, as displayed.",
          "maximum": 100000,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "file"
      ],
      "type": "object"
    },
    "main": {
      "description": "A chat message, written into the author's own repo in a Waystation space.",
      "key": "tid",
      "record": {
        "properties": {
          "attachment": {
            "ref": "#attachment",
            "type": "ref"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "text": {
            "description": "Message text. May be empty when an attachment is present.",
            "maxGraphemes": 1000,
            "maxLength": 10000,
            "type": "string"
          }
        },
        "required": [
          "text",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "com.cruftmanor.waystation.message",
  "lexicon": 1
}
```
