social.colibri.beta.thread.defs

colibri.social

Documentation

threadView object

A thread as the AppView serves it. The thread's identity is its space.

Properties

anchor ref social.colibri.beta.defs#spaceRecordRef Optional

The message the thread was opened from. Absent on a thread opened from scratch. Its space stays where the thread was opened even after the thread moves to another channel, which is what drops the thread's marker out of the old channel without losing the quoted message. A client draws the thread's marker in the channel river only where the anchor's space is the channel being read.

channel string space-ref Required

The channel the thread belongs to.

community string did Required

The community the thread's channel belongs to.

createdAt string datetime Required

When the thread was opened.

createdBy string did Required

Who opened the thread.

lastActivityAt string datetime Required

When the thread was last written to. This is what drives the activity age a client shows, since threads carry no presence roster of their own.

messageCount integer Required

How many messages the thread holds.

movedInCount integer Optional

How many of those messages were moved in from somewhere else.

name string Required

The thread's title.

participants array of stringdid Required

Who has posted, most recently active first, capped at a handful.

private boolean Optional

Whether the thread restricts who may read it beyond who may read its channel.

space string space-ref Required

The thread's space, which is its identity.

viewer ref #threadViewerState Required

The requesting user's relationship to this thread.

visibleToMembers array of stringdid Optional

Members that may read this thread beyond visibleToRoles.

visibleToRoles array of stringrecord-key Optional

Roles that may read this thread. Empty means everyone who can read the channel may.

View raw schema
{
  "description": "A thread as the AppView serves it. The thread's identity is its space.",
  "properties": {
    "anchor": {
      "description": "The message the thread was opened from. Absent on a thread opened from scratch. Its space stays where the thread was opened even after the thread moves to another channel, which is what drops the thread's marker out of the old channel without losing the quoted message. A client draws the thread's marker in the channel river only where the anchor's space is the channel being read.",
      "ref": "social.colibri.beta.defs#spaceRecordRef",
      "type": "ref"
    },
    "anchorMessage": {
      "description": "The anchor message itself, for opening a thread without having read its channel. Served by getThread rather than by listThreads.",
      "refs": [
        "social.colibri.beta.channel.defs#messageView",
        "social.colibri.beta.channel.defs#deletedMessageView"
      ],
      "type": "union"
    },
    "channel": {
      "description": "The channel the thread belongs to.",
      "format": "space-ref",
      "type": "string"
    },
    "community": {
      "description": "The community the thread's channel belongs to.",
      "format": "did",
      "type": "string"
    },
    "createdAt": {
      "description": "When the thread was opened.",
      "format": "datetime",
      "type": "string"
    },
    "createdBy": {
      "description": "Who opened the thread.",
      "format": "did",
      "type": "string"
    },
    "lastActivityAt": {
      "description": "When the thread was last written to. This is what drives the activity age a client shows, since threads carry no presence roster of their own.",
      "format": "datetime",
      "type": "string"
    },
    "messageCount": {
      "description": "How many messages the thread holds.",
      "type": "integer"
    },
    "movedInCount": {
      "description": "How many of those messages were moved in from somewhere else.",
      "type": "integer"
    },
    "name": {
      "description": "The thread's title.",
      "type": "string"
    },
    "participants": {
      "description": "Who has posted, most recently active first, capped at a handful.",
      "items": {
        "description": "Someone who has posted in the thread.",
        "format": "did",
        "type": "string"
      },
      "type": "array"
    },
    "private": {
      "description": "Whether the thread restricts who may read it beyond who may read its channel.",
      "type": "boolean"
    },
    "space": {
      "description": "The thread's space, which is its identity.",
      "format": "space-ref",
      "type": "string"
    },
    "viewer": {
      "description": "The requesting user's relationship to this thread.",
      "ref": "#threadViewerState",
      "type": "ref"
    },
    "visibleToMembers": {
      "description": "Members that may read this thread beyond visibleToRoles.",
      "items": {
        "description": "A member.",
        "format": "did",
        "type": "string"
      },
      "type": "array"
    },
    "visibleToRoles": {
      "description": "Roles that may read this thread. Empty means everyone who can read the channel may.",
      "items": {
        "description": "A role.",
        "format": "record-key",
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "space",
    "channel",
    "community",
    "name",
    "createdBy",
    "createdAt",
    "lastActivityAt",
    "messageCount",
    "participants",
    "viewer"
  ],
  "type": "object"
}
threadViewerState object

The requesting user's access and unread state for a thread.

Properties

canManage boolean Required

Whether the user may rename, move or delete this thread.

canPost boolean Required

Whether the user may post in this thread.

canRead boolean Required

Whether the user may read this thread.

cursor string tid Optional

The user's read cursor in this thread.

following boolean Required

Whether the user follows this thread.

hasUnread boolean Required

Whether anything in the thread is unread.

muted boolean Required

Whether the user has muted this thread.

unreadMentions integer Required

How many unread messages in the thread mention the user.

View raw schema
{
  "description": "The requesting user's access and unread state for a thread.",
  "properties": {
    "canManage": {
      "description": "Whether the user may rename, move or delete this thread.",
      "type": "boolean"
    },
    "canPost": {
      "description": "Whether the user may post in this thread.",
      "type": "boolean"
    },
    "canRead": {
      "description": "Whether the user may read this thread.",
      "type": "boolean"
    },
    "cursor": {
      "description": "The user's read cursor in this thread.",
      "format": "tid",
      "type": "string"
    },
    "following": {
      "description": "Whether the user follows this thread.",
      "type": "boolean"
    },
    "hasUnread": {
      "description": "Whether anything in the thread is unread.",
      "type": "boolean"
    },
    "muted": {
      "description": "Whether the user has muted this thread.",
      "type": "boolean"
    },
    "unreadMentions": {
      "description": "How many unread messages in the thread mention the user.",
      "type": "integer"
    }
  },
  "required": [
    "canRead",
    "canPost",
    "canManage",
    "following",
    "muted",
    "hasUnread",
    "unreadMentions"
  ],
  "type": "object"
}

Lexicon Garden

@