Overview
Messages are the core of Hazel Chat. Every message is delivered in real-time to all channel members with support for:- Rich text formatting with Plate.js editor
- Message replies and threads
- File attachments and embeds
- Message reactions
- Pin important messages
- Edit and delete capabilities
Real-Time Delivery
Messages sync instantly using Electric SQL’s local-first architecture with automatic conflict resolution
Offline Support
Compose messages offline and they’ll automatically sync when you reconnect
Rate Limited
Protected with 60 requests per minute per user to prevent abuse
Rich Formatting
Full rich text editor with formatting, links, code blocks, and more
Sending Messages
Basic Messages
To send a message in any channel:- Click into the message input field at the bottom of the channel
- Type your message using the rich text editor
- Press Enter to send (or Shift+Enter for a new line)
Messages support full Markdown-style formatting including bold, italic,
code, and more through the Plate.js editor.Message Attachments
Attach files to your messages by:- Click the attachment icon in the message composer
- Select files from your computer (stored in Cloudflare R2)
- Files are uploaded with a presigned URL for security
- Add your message text and send
Attachments support all common file types including images, videos, documents, and archives. Files are stored securely in Cloudflare R2 with public-read access.
Message Replies
Reply to any message to create a threaded conversation:- Hover over a message and click the Reply button
- The original message appears as context in your composer
- Type your reply and send
Message Threads
For longer conversations, create a dedicated thread channel:- Hover over a message and click Create Thread
- A new thread channel is automatically created
- The original message is linked to the thread
- All thread participants are added as channel members
- Threads cannot be nested (no threads within threads)
- Thread creators are automatically added as members
- AI-powered thread naming generates descriptive 3-6 word titles
AI-Powered Thread Naming
Thread channels can automatically generate descriptive names:- Open a thread channel with several messages
- Click Generate Name in the channel header
- AI analyzes the conversation context
- A descriptive 3-6 word name is generated
- Queries the original message and thread context
- Sends conversation data to the AI provider
- Generates a concise, descriptive name
- Updates the channel name automatically
Editing Messages
Edit your messages after sending:- Hover over your message and click Edit
- Make your changes in the editor
- Press Enter to save or Escape to cancel
Message edits preserve the original creation timestamp but add an
updatedAt field to track when changes were made.Deleting Messages
Remove messages from channels:- Hover over a message and click the Delete button
- Confirm the deletion
deletedAt timestamp) rather than permanently removed from the database. This allows for:
- Audit trails and compliance
- Potential message recovery
- Maintaining conversation integrity
Message Embeds
Webhooks and bots can send messages with rich embeds:- Title, description, and URL
- Custom colors (hex as integer)
- Author information with icon
- Footer text and icon
- Image and thumbnail
- Custom fields (inline or full-width)
- Status badges
- Timestamps
Live State Updates
Messages can include real-time updates for long-running operations:- Real-time progress indicators
- Status updates for deployments or builds
- Streaming AI responses
- Dynamic message content
cached field provides a snapshot for non-realtime clients.
Search and Navigation
Find messages quickly:- Use the command palette (Cmd/Ctrl+K) to search messages
- Jump to specific messages via direct links
- Navigate threads from parent messages
- View pinned messages in the channel sidebar
Message Notifications
Stay informed about new messages:- Receive notifications for mentions and replies
- Notification count shown on channel members
- Automatically clear notifications when messages are viewed
- Mute channels to suppress notifications
Technical Details
Rate Limiting
Message operations are rate-limited to 60 requests per minute per user to prevent spam and abuse.Data Model
Each message includes:id- Unique message identifierchannelId- Parent channelauthorId- Message authorcontent- Rich text contentreplyToMessageId- Optional reply referencethreadChannelId- Optional thread channel linkembeds- Rich embed data (for webhooks/bots)createdAt- Creation timestampupdatedAt- Last edit timestampdeletedAt- Soft delete timestamp