# Variable: message

```ts
const message: object & Typed<{
  mentions?: readonly string[];
  replyingTo?: string;
  text: string;
}>;
```

Defined in: [packages/core/src/schemas/library/publishing.ts:33](https://github.com/leifriksheim/minca/blob/main/core/src/schemas/library/publishing.ts#L33)

A chat message. The space is the room, or it links the `channel` it is in;
order is by when it was written. It can share one record — a poll to vote
on, a task — which a chat that knows the record's kind shows in place. The
text should still make sense alone ("Poll: Where to?"), for chats that don't.

`mentions` names who it calls on ("@Sam"), and `replyingTo` whose message
it answers. With its channel they are its topics, so "mentions me", "replies
to me" and "in #design" can be asked of a keeper that can't read it.

## Type Declaration

### description

```ts
readonly description: "A chat message, in order with the rest, optionally in a std.channel, replying to another or sharing a record. Posts to a feed are std.post; remarks on a record are std.comment." = 'A chat message, in order with the rest, optionally in a std.channel, replying to another or sharing a record. Posts to a feed are std.post; remarks on a record are std.comment.';
```

### links

```ts
readonly links: object;
```

#### links.in

```ts
readonly in: LinkDeclaration;
```

#### links.replyTo

```ts
readonly replyTo: object;
```

#### links.replyTo.cardinality

```ts
readonly cardinality: "one" = 'one';
```

#### links.replyTo.description

```ts
readonly description: "The message this replies to" = 'The message this replies to';
```

#### links.replyTo.to

```ts
readonly to: readonly ["std.message"];
```

#### links.shares

```ts
readonly shares: object;
```

#### links.shares.cardinality

```ts
readonly cardinality: "one" = 'one';
```

#### links.shares.description

```ts
readonly description: "A record this message shares, like a poll" = 'A record this message shares, like a poll';
```

#### links.shares.to

```ts
readonly to: "*" = '*';
```

### name

```ts
readonly name: "std.message" = 'std.message';
```

### schema

```ts
readonly schema: object;
```

#### schema.properties

```ts
readonly properties: object;
```

#### schema.properties.mentions

```ts
readonly mentions: object;
```

#### schema.properties.mentions.items

```ts
items: object & object;
```

##### Type Declaration

###### maxLength

```ts
maxLength: number = max;
```

###### minLength?

```ts
minLength?: number = min;
```

###### type

```ts
type: "string";
```

###### x-kind

```ts
readonly "x-kind": "did";
```

#### schema.properties.mentions.maxItems

```ts
maxItems: number = max;
```

#### schema.properties.mentions.type

```ts
type: "array";
```

#### schema.properties.replyingTo

```ts
readonly replyingTo: object & object;
```

##### Type Declaration

###### maxLength

```ts
maxLength: number = max;
```

###### minLength?

```ts
minLength?: number = min;
```

###### type

```ts
type: "string";
```

###### x-kind

```ts
readonly "x-kind": "did";
```

#### schema.properties.text

```ts
readonly text: object;
```

#### schema.properties.text.maxLength

```ts
readonly maxLength: 10000 = 10000;
```

#### schema.properties.text.minLength

```ts
readonly minLength: 1 = 1;
```

#### schema.properties.text.type

```ts
readonly type: "string" = 'string';
```

#### schema.required

```ts
readonly required: readonly ["text"];
```

#### schema.type

```ts
readonly type: "object" = 'object';
```

### title

```ts
readonly title: "Message" = 'Message';
```

### topics

```ts
readonly topics: readonly ["link:in", "mentions", "replyingTo"];
```
