social.colibri.beta.channel.defs

colibri.social

Documentation

attachmentView object

A file attached to a message.

Properties

height integer Optional

Intrinsic pixel height, when the file is a decodable image or video.

mimeType string Required

The sniffed content type.

name string Optional

The original filename.

maxLength: 256 bytes
size integer Optional

Size in bytes.

url string uri Required

URL served by this AppView's blob proxy.

width integer Optional

Intrinsic pixel width, when the file is a decodable image or video.

View raw schema
{
  "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 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.

Properties

channel string space-ref Required

The channel space it lived in.

rkey string record-key Required

The message's record key.

uri string at-uri Required

The message's full space AT-URI.

View raw schema
{
  "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."
}
messageView object

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

Properties

channel string space-ref Required

The channel space the message lives in.

createdAt string datetime Required

When it was sent.

labels array of refsocial.colibri.beta.community.defs#labelView Required

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 Optional

Whether this message comes from the repo-backed community this channel was migrated from, and is therefore immutable.

parent union Optional

The message being replied to, or a stand-in when it can no longer be served. Never itself nested.

reactions array of ref#reactionView Required

Reactions, aggregated by emoji.

rkey string record-key Required

The message's record key, for addressing it as a reply target.

suppressedEmbeds array of stringuri Optional

URLs whose preview the author chose not to show.

text string Required

The message body.

updatedAt string datetime Optional

When it was last edited. Absent means never edited.

uri string at-uri Required

The message's full space AT-URI.

View raw schema
{
  "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 object

Reactions to a message with one emoji.

Properties

count integer Required

How many people reacted.

emoji string Required

The emoji or custom shortcode.

reactors array of stringdid Required

Who reacted.

viewerReacted boolean Optional

Whether the requesting user is among them.

View raw schema
{
  "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 object

Per-channel unread state for the requesting user.

Properties

channel string space-ref Required

The channel.

cursor string tid Optional

The user's current read cursor.

hasUnread boolean Required

Whether anything is unread.

unreadMentions integer Required

How many unread messages mention the user.

View raw schema
{
  "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."
}

Lexicon Garden

@