{
"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
}