# fyi.opensocial.chat.message

> Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.chat.message)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.chat.message/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.chat.message/examples)

## Definitions

### `fyi.opensocial.chat.message`

**Type**: `record`

A message in a group's chat, in its author's own repo in the group's chat space.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `embed` | `union` | No | Something shared with the message, shown with it: a page, or pictures. |
| `reply` | `ref` → `com.atproto.repo.strongRef` | No | The message this answers, in its thread: replies are shown together under the message that started it, not in the room. |
| `room` | `ref` → `com.atproto.repo.strongRef` | No | What the room this was said in is about, such as an upcoming event. Without one, the group's own room. |
| `text` | `string` | Yes |  |

### `fyi.opensocial.chat.message#record`

**Type**: `object`

A record shared with a message, shown as a card for what it is: a page a member made (fyi.opensocial.page), opened as it is now.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `record` | `ref` → `com.atproto.repo.strongRef` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A message in a group's chat, in its author's own repo in the group's chat space.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "embed": {
            "description": "Something shared with the message, shown with it: a page, or pictures.",
            "refs": [
              "#record",
              "fyi.opensocial.embed.images"
            ],
            "type": "union"
          },
          "reply": {
            "description": "The message this answers, in its thread: replies are shown together under the message that started it, not in the room.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "room": {
            "description": "What the room this was said in is about, such as an upcoming event. Without one, the group's own room.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "text": {
            "maxGraphemes": 1000,
            "maxLength": 10000,
            "type": "string"
          }
        },
        "required": [
          "text",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "record": {
      "description": "A record shared with a message, shown as a card for what it is: a page a member made (fyi.opensocial.page), opened as it is now.",
      "properties": {
        "record": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        }
      },
      "required": [
        "record"
      ],
      "type": "object"
    }
  },
  "id": "fyi.opensocial.chat.message",
  "lexicon": 1
}
```
