# place.stream.chat.message

> Record containing a Streamplace chat message.

- Kind: record
- Record key: tid
- Authority: chat.stream.place
- Lexicon: 1
- Published by [stream.place](https://lexicon.garden/identity/did:plc:rbvrr34edl5ddpuwcubjiost), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.chat.message)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.chat.message/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.chat.message/analytics)

## Record (`place.stream.chat.message`)

Type: record · key tid

### Properties

- `createdAt` (string · datetime, required): Client-declared timestamp when this message was originally created.
- `facets` (array): Annotations of text (mentions, URLs, etc)
  - `items` (ref)
    - Reference: `place.stream.richtext.facet`
- `reply` (ref)
  - Reference: `#replyRef`
- `streamer` (string · did, required): The DID of the streamer whose chat this is.
- `text` (string, required): The primary message content. May be an empty string, if there are embeds.
  - Constraints: maxLength: 3000, maxGraphemes: 300

## #replyRef (`place.stream.chat.message#replyRef`)

Type: object

### Properties

- `parent` (ref, required)
  - Reference: `com.atproto.repo.strongRef`
- `root` (ref, required)
  - Reference: `com.atproto.repo.strongRef`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Record containing a Streamplace chat message.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "description": "Client-declared timestamp when this message was originally created.",
            "format": "datetime",
            "type": "string"
          },
          "facets": {
            "description": "Annotations of text (mentions, URLs, etc)",
            "items": {
              "ref": "place.stream.richtext.facet",
              "type": "ref"
            },
            "type": "array"
          },
          "reply": {
            "ref": "#replyRef",
            "type": "ref"
          },
          "streamer": {
            "description": "The DID of the streamer whose chat this is.",
            "format": "did",
            "type": "string"
          },
          "text": {
            "description": "The primary message content. May be an empty string, if there are embeds.",
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          }
        },
        "required": [
          "text",
          "createdAt",
          "streamer"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "replyRef": {
      "properties": {
        "parent": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "root": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        }
      },
      "required": [
        "root",
        "parent"
      ],
      "type": "object"
    }
  },
  "id": "place.stream.chat.message",
  "lexicon": 1
}
```
