Key Benefit: Enhance user experience with lightweight message previews that enable quick content assessment in channel lists, notifications, and conversation overviews without full message loading.
Feature Overview
Message Preview provides partial message data through channel and subchannel objects, offering users a brief summary of incoming messages. This feature enables efficient content assessment and prioritization without the overhead of loading complete message content.Performance Optimization
Efficient data loading
- Lightweight message preview
- Reduced bandwidth usage
- Faster interface rendering
- Battery-efficient operations
Enhanced User Experience
Improved interaction flows
- Quick message assessment
- Priority-based responses
- Streamlined notifications
- Context-aware previews
Configuration Required: Message Preview must be enabled via API before use. The feature only works for new messages created after activation.Enable Message Preview API:
PUT /api/v3/network-settings/chat
Implementation Guide
Access message previews through channel objectsRetrieve the latest message preview from channels to display in chat lists, notifications, and conversation overviews.
Message Preview Attributes
Attribute | Type | Description |
---|---|---|
messageId | String | Unique identifier of the message |
channelId | String | ID of the channel containing the message |
userId | String | ID of the user who created the message |
type | MessageType | Message type (text, image, file, custom, etc.) |
data | Object | Message content data (text stored in “text” key) |
isDeleted | Boolean | Whether the message has been deleted |
createdAt | Date | Message creation timestamp |
updatedAt | Date | Last message update timestamp |
Code Examples
Availability: Message previews are only available for channels, and only for messages created after the feature is enabled in your network settings.
Related Features
Channel Management
Channel Operations
Create and manage channels with preview support
Message Querying
Message Retrieval
Advanced message querying and filtering
Real-time Updates
Live Synchronization
Real-time message and preview updates
Implementation Strategy: Start with basic channel preview display, then enhance with notification integration and performance optimizations. Focus on data efficiency and user experience quality for the best results.