全部文档

更新时间: 2020-08-26

# 本地获取

Web 没有本地存储,不提供本地获取方法。

# 远端获取

使用此方法需要在开发者后台开启 IM 商用版 - 单群聊云存储 (opens new window) 服务。

# 参数说明

输入参数说明

回调参数说明

参数 类型 说明
list Array 获取的历史消息列表,返回 message 列表
hasMore Bool 是否还有历史消息可以获取

message 属性说明

字段名 类型 说明
type Number 会话类型
targetId String 接收方的 userId
senderUserId String 发送者 id
content Object 消息内容
messageType String 消息标识
messageUId String 服务端存储的消息 id
messageDirection Number 消息方向。 发送: 1, 接收: 2
isOffLineMessage Boolean 是否为离线消息
sentTime Number 消息在融云服务端的发送时间
receivedTime Number 消息接收时间. isOffLineMessage 为 true 时, receivedTime 无效
isPersited Boolean 消息是否存储在服务端
isCounted Boolean 消息是否计数
isMentioned Boolean 是否为 @ 消息
# 代码示例

文档是否解决您的问题 ?

如果遇到产品相关问题,您可 提交工单 寻求帮助