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
Implementation Guide
- Channel Message Preview
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.