Overview
The Message node represents a message posted in a channel. Messages support rich text content through blocks, can reference other messages (for threading), and support reactions from users.Attributes Schema
Must be
'message'The message subtype:
'standard': Regular message'question': Question message (for Q&A channels)'answer': Answer to a question
Optional name/title for the message
ID of the parent channel or message (for threading)
ID of the message being referenced/replied to
Map of block IDs to block content. Blocks are rich content elements (text, images, embeds, etc.)
Array of node IDs selected as context for this message (used for AI features)
Permissions
canCreate
Rules:- Tree must not be empty (cannot create at root)
- User must have at least
'viewer'role in the parent channel
/home/daytona/workspace/source/packages/core/src/registry/nodes/message.ts:25-40
canUpdateAttributes
Rules:- Tree must not be empty
- User must be the message creator (
createdBy === user.id) - Note: Role in channel must also exist
/home/daytona/workspace/source/packages/core/src/registry/nodes/message.ts:41-56
canUpdateDocument
Rules:- Always returns
false(messages do not have separate documents, content is in attributes)
canDelete
Rules:- Tree must not be empty
- User must be the message creator OR have
'admin'role in the channel
/home/daytona/workspace/source/packages/core/src/registry/nodes/message.ts:60-77
canReact
Rules:- Tree must not be empty
- User must have at least
'viewer'role in the parent channel
/home/daytona/workspace/source/packages/core/src/registry/nodes/message.ts:78-93
Document Schema
Messages do not have separate documents. Content is stored in thecontent attribute using blocks.
Block Schema
Thecontent field uses block-based rich content:
/home/daytona/workspace/source/packages/core/src/registry/block.ts
Text Extraction
/home/daytona/workspace/source/packages/core/src/registry/nodes/message.ts:94-105
Mentions
Mentions are extracted from the block content:/home/daytona/workspace/source/packages/core/src/registry/nodes/message.ts:106-113