# social.colibri.beta.channel.defs

> Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.channel.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.channel.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.channel.defs/examples)

## Definitions

### `social.colibri.beta.channel.defs#messageView`

**Type**: `object`

A message as the AppView serves it, with its author, reactions and labels resolved.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | The message's full space AT-URI. |
| `rkey` | `string` (record-key) | Yes | The message's record key, for addressing it as a reply target. |
| `text` | `string` | Yes | The message body. |
| `author` | `ref` → `social.colibri.beta.actor.defs#profileView` | Yes | Who wrote it. |
| `embeds` | `array` | No | Resolved link previews. |
| `facets` | `array` | No | Rich text annotations. |
| `labels` | `array` | Yes | Labels from labelers this community honours. `src` says who applied each one. A `hidden` label is enforced by the AppView, which withholds the message rather than serving it, so a message that reaches you carries only labels you are meant to act on for display, such as `spoiler`. |
| `legacy` | `boolean` | No | Whether this message comes from the repo-backed community this channel was migrated from, and is therefore immutable. |
| `parent` | `union` | No | The message being replied to, or a stand-in when it can no longer be served. Never itself nested. |
| `channel` | `string` (space-ref) | Yes | The channel space the message lives in. |
| `createdAt` | `string` (datetime) | Yes | When it was sent. |
| `reactions` | `array` | Yes | Reactions, aggregated by emoji. |
| `updatedAt` | `string` (datetime) | No | When it was last edited. Absent means never edited. |
| `attachments` | `array` | Yes | Attached files. |
| `suppressedEmbeds` | `array` | No | URLs whose preview the author chose not to show. |

### `social.colibri.beta.channel.defs#reactionView`

**Type**: `object`

Reactions to a message with one emoji.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `count` | `integer` | Yes | How many people reacted. |
| `emoji` | `string` | Yes | The emoji or custom shortcode. |
| `reactors` | `array` | Yes | Who reacted. |
| `viewerReacted` | `boolean` | No | Whether the requesting user is among them. |

### `social.colibri.beta.channel.defs#unreadStatus`

**Type**: `object`

Per-channel unread state for the requesting user.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` (tid) | No | The user's current read cursor. |
| `channel` | `string` (space-ref) | Yes | The channel. |
| `hasUnread` | `boolean` | Yes | Whether anything is unread. |
| `unreadMentions` | `integer` | Yes | How many unread messages mention the user. |

### `social.colibri.beta.channel.defs#attachmentView`

**Type**: `object`

A file attached to a message.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `url` | `string` (uri) | Yes | URL served by this AppView's blob proxy. |
| `name` | `string` | No | The original filename. |
| `size` | `integer` | No | Size in bytes. |
| `width` | `integer` | No | Intrinsic pixel width, when the file is a decodable image or video. |
| `height` | `integer` | No | Intrinsic pixel height, when the file is a decodable image or video. |
| `mimeType` | `string` | Yes | The sniffed content type. |

### `social.colibri.beta.channel.defs#deletedMessageView`

**Type**: `object`

Stands in for a message the AppView will not serve: deleted by its author, or hidden by a moderator. The two cases are deliberately indistinguishable, so hiding does not leak what was hidden. Render it as an unavailable message.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | The message's full space AT-URI. |
| `rkey` | `string` (record-key) | Yes | The message's record key. |
| `channel` | `string` (space-ref) | Yes | The channel space it lived in. |

## Raw Schema

```json
{
  "id": "social.colibri.beta.channel.defs",
  "defs": {
    "messageView": {
      "type": "object",
      "required": [
        "uri",
        "rkey",
        "channel",
        "author",
        "text",
        "createdAt",
        "attachments",
        "reactions",
        "labels"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "The message's full space AT-URI."
        },
        "rkey": {
          "type": "string",
          "format": "record-key",
          "description": "The message's record key, for addressing it as a reply target."
        },
        "text": {
          "type": "string",
          "description": "The message body."
        },
        "author": {
          "ref": "social.colibri.beta.actor.defs#profileView",
          "type": "ref",
          "description": "Who wrote it."
        },
        "embeds": {
          "type": "array",
          "items": {
            "ref": "social.colibri.beta.embed.defs#linkEmbed",
            "type": "ref"
          },
          "description": "Resolved link previews."
        },
        "facets": {
          "type": "array",
          "items": {
            "ref": "social.colibri.beta.richtext.facet",
            "type": "ref"
          },
          "description": "Rich text annotations."
        },
        "labels": {
          "type": "array",
          "items": {
            "ref": "social.colibri.beta.community.defs#labelView",
            "type": "ref"
          },
          "description": "Labels from labelers this community honours. `src` says who applied each one. A `hidden` label is enforced by the AppView, which withholds the message rather than serving it, so a message that reaches you carries only labels you are meant to act on for display, such as `spoiler`."
        },
        "legacy": {
          "type": "boolean",
          "description": "Whether this message comes from the repo-backed community this channel was migrated from, and is therefore immutable."
        },
        "parent": {
          "refs": [
            "#messageView",
            "#deletedMessageView"
          ],
          "type": "union",
          "description": "The message being replied to, or a stand-in when it can no longer be served. Never itself nested."
        },
        "channel": {
          "type": "string",
          "format": "space-ref",
          "description": "The channel space the message lives in."
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "When it was sent."
        },
        "reactions": {
          "type": "array",
          "items": {
            "ref": "#reactionView",
            "type": "ref"
          },
          "description": "Reactions, aggregated by emoji."
        },
        "updatedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When it was last edited. Absent means never edited."
        },
        "attachments": {
          "type": "array",
          "items": {
            "ref": "#attachmentView",
            "type": "ref"
          },
          "description": "Attached files."
        },
        "suppressedEmbeds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri",
            "description": "A URL."
          },
          "description": "URLs whose preview the author chose not to show."
        }
      },
      "description": "A message as the AppView serves it, with its author, reactions and labels resolved."
    },
    "reactionView": {
      "type": "object",
      "required": [
        "emoji",
        "count",
        "reactors"
      ],
      "properties": {
        "count": {
          "type": "integer",
          "description": "How many people reacted."
        },
        "emoji": {
          "type": "string",
          "description": "The emoji or custom shortcode."
        },
        "reactors": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "did",
            "description": "Someone who reacted."
          },
          "description": "Who reacted."
        },
        "viewerReacted": {
          "type": "boolean",
          "description": "Whether the requesting user is among them."
        }
      },
      "description": "Reactions to a message with one emoji."
    },
    "unreadStatus": {
      "type": "object",
      "required": [
        "channel",
        "hasUnread",
        "unreadMentions"
      ],
      "properties": {
        "cursor": {
          "type": "string",
          "format": "tid",
          "description": "The user's current read cursor."
        },
        "channel": {
          "type": "string",
          "format": "space-ref",
          "description": "The channel."
        },
        "hasUnread": {
          "type": "boolean",
          "description": "Whether anything is unread."
        },
        "unreadMentions": {
          "type": "integer",
          "description": "How many unread messages mention the user."
        }
      },
      "description": "Per-channel unread state for the requesting user."
    },
    "attachmentView": {
      "type": "object",
      "required": [
        "url",
        "mimeType"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "URL served by this AppView's blob proxy."
        },
        "name": {
          "type": "string",
          "maxLength": 256,
          "description": "The original filename."
        },
        "size": {
          "type": "integer",
          "description": "Size in bytes."
        },
        "width": {
          "type": "integer",
          "description": "Intrinsic pixel width, when the file is a decodable image or video."
        },
        "height": {
          "type": "integer",
          "description": "Intrinsic pixel height, when the file is a decodable image or video."
        },
        "mimeType": {
          "type": "string",
          "description": "The sniffed content type."
        }
      },
      "description": "A file attached to a message."
    },
    "deletedMessageView": {
      "type": "object",
      "required": [
        "uri",
        "rkey",
        "channel"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "The message's full space AT-URI."
        },
        "rkey": {
          "type": "string",
          "format": "record-key",
          "description": "The message's record key."
        },
        "channel": {
          "type": "string",
          "format": "space-ref",
          "description": "The channel space it lived in."
        }
      },
      "description": "Stands in for a message the AppView will not serve: deleted by its author, or hidden by a moderator. The two cases are deliberately indistinguishable, so hiding does not leak what was hidden. Render it as an unavailable message."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
