- Docs »
- Class: RecalledMessage
Constructor
new RecalledMessage()
Extends
Members
-
attributes :Object
-
- Inherited From:
-
nullable cid :String
-
消息所在的 conversation id
- Inherited From:
-
nullable deliveredAt :Date
-
消息送达时间
- Inherited From:
-
from :String
-
消息发送者
- Inherited From:
-
id :String
-
- Inherited From:
-
readonly mentioned :Boolean
-
当前用户是否在该消息中被提及
- Since:
- Inherited From:
-
mentionedAll :Boolean
-
消息是否提及了所有人
- Since:
- Inherited From:
-
mentionList :Array.<String>
-
消息提及的用户
- Since:
- Inherited From:
-
readonly status :Symbol
-
- Since:
- Inherited From:
-
readonly summary :String
-
在客户端需要以文本形式展示该消息时显示的文案,值为 [该消息已撤回]
- Overrides:
-
text :String
-
- Inherited From:
-
timestamp :Date
-
消息发送时间
- Inherited From:
-
readonly type :Number
-
- Inherited From:
-
updatedAt :Date
-
消息修改或撤回时间,可以通过比较其与消息的 timestamp 是否相等判断消息是否被修改过或撤回过。
- Since:
- Inherited From:
Methods
-
getAttributes()
→ {Object}
-
Returns:
Object
- Inherited From:
-
getMentionList()
→ {Array.<String>}
-
获取提及用户列表
Returns:
Array.<String>
- 提及用户的 id 列表
- Since:
- Inherited From:
-
getText()
→ {String}
-
Returns:
String
- Inherited From:
-
mentionAll(valueopt)
→ {this}
-
设置是否提及所有人
Parameters:
Name |
Type |
Attributes |
Default |
Description |
value |
Boolean
|
<optional>
|
true
|
|
Returns:
this
- self
- Since:
- Inherited From:
-
setAttributes(attributes)
→ {this}
-
Parameters:
Name |
Type |
Description |
attributes |
Object
|
|
Returns:
this
- self
- Inherited From:
-
setMentionList(clients)
→ {this}
-
设置提及用户列表
Parameters:
Name |
Type |
Description |
clients |
Array.<String>
|
提及用户的 id 列表 |
Returns:
this
- self
- Since:
- Inherited From:
-
setText(text)
→ {this}
-
Parameters:
Name |
Type |
Description |
text |
String
|
|
Returns:
this
- self
- Inherited From:
-
toFullJSON()
→ {Object}
-
Returns:
Object
- 返回值是一个 plain Object
- Since:
- Inherited From:
-
toJSON()
→ {Object}
-
返回 JSON 格式的消息
Returns:
Object
- 返回值是一个 plain Object
- Inherited From: