# social.colibri.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.channel.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.channel.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.channel.defs/examples)

## Definitions

### `social.colibri.channel.defs#message`

**Type**: `object`

A hydrated message as served by the AppView.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes |  |
| `text` | `string` | Yes |  |
| `author` | `ref` → `lex:social.colibri.actor.defs#actorView` | Yes |  |
| `edited` | `boolean` | Yes |  |
| `facets` | `array` | Yes |  |
| `parent` | `ref` → `lex:social.colibri.channel.defs#message` | No | The message this one replies to, if any. Never itself nested (the parent's own parent is omitted). |
| `channel` | `string` (at-uri) | Yes |  |
| `community` | `string` (at-uri) | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `reactions` | `array` | Yes |  |
| `attachments` | `array` | Yes |  |
| `suppressedEmbeds` | `array` | No | URLs whose embed the author suppressed, mirrored from the message record. |
| `modSuppressedEmbeds` | `array` | No | URLs whose embed a moderator suppressed, derived from the community's moderation log. Only the moderator who can hide messages may clear these. |

### `social.colibri.channel.defs#attachment`

**Type**: `object`

A file attached to a message.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `blob` | `blob` | Yes |  |
| `name` | `string` | No |  |
| `width` | `integer` | No | Pixel width of the attachment's intrinsic dimensions, when it is a decodable image or video. Lets a client reserve the correct box before the bytes arrive. |
| `height` | `integer` | No | Pixel height of the attachment's intrinsic dimensions, when it is a decodable image or video. |

### `social.colibri.channel.defs#readCursor`

**Type**: `object`

The authenticated user's read cursor for a channel.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes |  |
| `cursor` | `string` | Yes |  |
| `channel` | `string` (at-uri) | Yes |  |

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

**Type**: `object`

An aggregated reaction on a message.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `count` | `integer` | Yes |  |
| `emoji` | `string` | Yes |  |
| `reactorDIDs` | `array` | Yes |  |

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

**Type**: `object`

Per-channel unread state for the authenticated user.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `channelUri` | `string` (at-uri) | Yes |  |
| `unreadPingCount` | `integer` | Yes |  |
| `hasUnreadMessages` | `boolean` | Yes |  |

## Raw Schema

```json
{
  "id": "social.colibri.channel.defs",
  "defs": {
    "message": {
      "type": "object",
      "required": [
        "uri",
        "text",
        "facets",
        "channel",
        "community",
        "author",
        "attachments",
        "reactions",
        "createdAt",
        "edited"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "text": {
          "type": "string"
        },
        "author": {
          "ref": "lex:social.colibri.actor.defs#actorView",
          "type": "ref"
        },
        "edited": {
          "type": "boolean"
        },
        "facets": {
          "type": "array",
          "items": {
            "ref": "lex:social.colibri.richtext.facet",
            "type": "ref"
          }
        },
        "parent": {
          "ref": "lex:social.colibri.channel.defs#message",
          "type": "ref",
          "description": "The message this one replies to, if any. Never itself nested (the parent's own parent is omitted)."
        },
        "channel": {
          "type": "string",
          "format": "at-uri"
        },
        "community": {
          "type": "string",
          "format": "at-uri"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "reactions": {
          "type": "array",
          "items": {
            "ref": "lex:social.colibri.channel.defs#reactionView",
            "type": "ref"
          }
        },
        "attachments": {
          "type": "array",
          "items": {
            "ref": "lex:social.colibri.channel.defs#attachment",
            "type": "ref"
          }
        },
        "suppressedEmbeds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          },
          "description": "URLs whose embed the author suppressed, mirrored from the message record."
        },
        "modSuppressedEmbeds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          },
          "description": "URLs whose embed a moderator suppressed, derived from the community's moderation log. Only the moderator who can hide messages may clear these."
        }
      },
      "description": "A hydrated message as served by the AppView."
    },
    "attachment": {
      "type": "object",
      "required": [
        "blob"
      ],
      "properties": {
        "blob": {
          "type": "blob"
        },
        "name": {
          "type": "string"
        },
        "width": {
          "type": "integer",
          "description": "Pixel width of the attachment's intrinsic dimensions, when it is a decodable image or video. Lets a client reserve the correct box before the bytes arrive."
        },
        "height": {
          "type": "integer",
          "description": "Pixel height of the attachment's intrinsic dimensions, when it is a decodable image or video."
        }
      },
      "description": "A file attached to a message."
    },
    "readCursor": {
      "type": "object",
      "required": [
        "uri",
        "cursor",
        "channel"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "cursor": {
          "type": "string"
        },
        "channel": {
          "type": "string",
          "format": "at-uri"
        }
      },
      "description": "The authenticated user's read cursor for a channel."
    },
    "reactionView": {
      "type": "object",
      "required": [
        "emoji",
        "count",
        "reactorDIDs"
      ],
      "properties": {
        "count": {
          "type": "integer"
        },
        "emoji": {
          "type": "string"
        },
        "reactorDIDs": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "did"
          }
        }
      },
      "description": "An aggregated reaction on a message."
    },
    "unreadStatus": {
      "type": "object",
      "required": [
        "channelUri",
        "hasUnreadMessages",
        "unreadPingCount"
      ],
      "properties": {
        "channelUri": {
          "type": "string",
          "format": "at-uri"
        },
        "unreadPingCount": {
          "type": "integer"
        },
        "hasUnreadMessages": {
          "type": "boolean"
        }
      },
      "description": "Per-channel unread state for the authenticated user."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
