new Message(content)
Parameters:
| Name | Type | Description | 
|---|---|---|
content | 
            
            Object | String | ArrayBuffer | 消息内容 | 
- Implements:
 - AVMessage
 
Members
- 
nullable cid :String
 - 
    
    消息所在的 conversation id
 - 
nullable deliveredAt :Date
 - 
    
    消息送达时间
 - 
from :String
 - 
    
    消息发送者
 - 
id :String
 - 
    
    
 - 
readonly mentioned :Boolean
 - 
    
    当前用户是否在该消息中被提及
- Since:
 - 4.0.0
 
 - 
mentionedAll :Boolean
 - 
    
    消息是否提及了所有人
- Since:
 - 4.0.0
 
 - 
mentionList :Array.<String>
 - 
    
    消息提及的用户
- Since:
 - 4.0.0
 
 - 
readonly status :Symbol
 - 
    
    消息状态,值为 module:leancloud-realtime.MessageStatus 之一
- Since:
 - 3.2.0
 
 - 
timestamp :Date
 - 
    
    消息发送时间
 - 
updatedAt :Date
 - 
    
    消息修改或撤回时间,可以通过比较其与消息的 timestamp 是否相等判断消息是否被修改过或撤回过。
- Since:
 - 3.5.0
 
 
Methods
- 
    
    
getMentionList() → {Array.<String>}
 - 
    
    获取提及用户列表
Returns:
Array.<String> - 提及用户的 id 列表- Since:
 - 4.0.0
 
 - 
    
    
mentionAll(valueopt) → {this}
 - 
    
    设置是否提及所有人
Parameters:
Name Type Attributes Default Description valueBoolean <optional> 
true Returns:
this - self- Since:
 - 4.0.0
 
 - 
    
    
setMentionList(clients) → {this}
 - 
    
    设置提及用户列表
Parameters:
Name Type Description clientsArray.<String> 提及用户的 id 列表 Returns:
this - self- Since:
 - 4.0.0
 
 - 
    
    
toFullJSON() → {Object}
 - 
    
    返回 JSON 格式的消息,与 toJSON 不同的是,该对象包含了完整的信息,可以通过 IMClient#parseMessage 反序列化。
Returns:
Object - 返回值是一个 plain Object- Since:
 - 4.0.0
 
 - 
    
    
toJSON() → {Object}
 - 
    
    返回 JSON 格式的消息
Returns:
Object - 返回值是一个 plain Object