Class: Session

Session


new Session()

Properties:
Name Type Argument Description
id String

会话ID

scene String

场景

to String

聊天对象, 账号或群ID

updateTime Long

会话更新的时间

unread Number

未读数

lastMsg Message

此会话的最后一条消息

msgReceiptTime Long <optional>

消息已读回执时间戳, 如果有此字段, 说明此时间戳之前的所有消息对方均已读

  • 目前仅对'p2p'会话起作用
  • 此字段不一定有, 只有对方发送过已读回执之后才会有
  • 调用接口sendMsgReceipt来发送消息已读回执
  • 调用接口isMsgRemoteRead来查询消息是否被对方读过了
isTop Boolean <optional>

是否为被置顶会话

topCustom String <optional>

置顶的扩展字段

localCustom String

本地自定义扩展字段