Documentation Index
Fetch the complete documentation index at: https://wukong.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Concept Explanation
What is a Message?
A Message is the basic unit of information transmission in WuKongIM, serving as the carrier for real-time communication between users. Each message contains information about the sender, receiver, content, and metadata.Why are Messages Important?
- Communication Foundation: Messages are the core of instant messaging systems; all chat functionality is based on message transmission
- Data Carrier: Messages can transmit not only text but also various types of data like images, files, and locations
- Status Tracking: Each message has a unique identifier and status, making it easy to track message sending, receiving, and read status
Relationship with Other Concepts
- Channel: Messages are transmitted through channels, which define the message destination
- User: Messages have clear senders and receivers, all of whom are users in the system
- Conversation: Messages update corresponding conversation records, affecting conversation list display
Core Structure
Messages contain the following core attributes:| Attribute | Type | Description |
|---|---|---|
message_id | integer | Message unique identifier |
message_seq | integer | Message sequence number within channel |
client_msg_no | string | Client message identifier |
from_uid | string | Sender user ID |
channel_id | string | Target channel ID |
channel_type | integer | Channel type (1=personal, 2=group) |
timestamp | integer | Message timestamp |
payload | string | Base64 encoded message content |
Message Example
Related API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/message/send | POST | Send single message |
/message/sendbatch | POST | Send batch messages |
/message/search | POST | Search historical messages |
/channel/messagesync | POST | Sync channel messages |
EasySDK Code Examples
Send Messages
Listen for Messages
Message Type Handling
The message content
payload field uses Base64 encoding, with the specific format defined by the application layer.
