# place.stream.chat.defs

> Published by [did:web:stream.place](https://lexicon.garden/identity/did:web:stream.place)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.chat.defs)
- [Documentation](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.chat.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.chat.defs/examples)

## Definitions

### `place.stream.chat.defs#messageView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |
| `author` | `ref` → `app.bsky.actor.defs#profileViewBasic` | Yes |  |
| `badges` | `array` | No | Up to 3 badge tokens to display with the message. First badge is server-controlled, remaining badges are user-settable. Tokens are looked up in badges.json for display info. |
| `record` | `unknown` | Yes |  |
| `deleted` | `boolean` | No | If true, this message has been deleted or labeled and should be cleared from the cache |
| `replyTo` | `union` | No |  |
| `indexedAt` | `string` (datetime) | Yes |  |
| `chatProfile` | `ref` → `place.stream.chat.profile` | No |  |

### `place.stream.chat.defs#pinnedRecordView`

**Type**: `object`

View of a pinned chat record with hydrated message data.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |
| `record` | `ref` → `place.stream.chat.pinnedRecord` | Yes |  |
| `message` | `ref` → `#messageView` | No |  |
| `pinnedBy` | `ref` → `place.stream.chat.profile` | No |  |
| `indexedAt` | `string` (datetime) | Yes |  |

## Raw Schema

```json
{
  "id": "place.stream.chat.defs",
  "defs": {
    "messageView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "author",
        "record",
        "indexedAt"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "author": {
          "ref": "app.bsky.actor.defs#profileViewBasic",
          "type": "ref"
        },
        "badges": {
          "type": "array",
          "items": {
            "ref": "place.stream.badge.defs#badgeView",
            "type": "ref"
          },
          "maxLength": 3,
          "description": "Up to 3 badge tokens to display with the message. First badge is server-controlled, remaining badges are user-settable. Tokens are looked up in badges.json for display info."
        },
        "record": {
          "type": "unknown"
        },
        "deleted": {
          "type": "boolean",
          "description": "If true, this message has been deleted or labeled and should be cleared from the cache"
        },
        "replyTo": {
          "refs": [
            "#messageView"
          ],
          "type": "union"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime"
        },
        "chatProfile": {
          "ref": "place.stream.chat.profile",
          "type": "ref"
        }
      }
    },
    "pinnedRecordView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "record",
        "indexedAt"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "record": {
          "ref": "place.stream.chat.pinnedRecord",
          "type": "ref"
        },
        "message": {
          "ref": "#messageView",
          "type": "ref"
        },
        "pinnedBy": {
          "ref": "place.stream.chat.profile",
          "type": "ref"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime"
        }
      },
      "description": "View of a pinned chat record with hydrated message data."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
