Interface Session

Hierarchy

  • Session

Properties

ack?: number

@Multi_Lang_Tag

Locale

cn 自己已读过的最近一条消息的时间

用于判别自己已读到哪条消息了

Locale

Locale

en The time when you read the last message

Used to determine which message you have read

Locale

id: string

@Multi_Lang_Tag

Locale

cn sessionId

例如 p2p-cs1、team-113879441

Locale

Locale

en sessionId

Example: p2p-cs1, team-113879441

Locale

lastMsg?: null | IMMessage

@Multi_Lang_Tag

Locale

cn 上一条消息.

若 lastMsg 为 undefined ,那么代表这个会话从没有过消息,导致会话不完整. sdk 将过滤掉此会话, 不会回调给上层的开发者

若 lastMsg 为 null,lastMsg 为 null 则可能是撤回消息,也可能是清除了这个会话的历史消息

Locale

Locale

en Previous message

If lastMsg is undefined, it may have never received or sent messages and the conversation is incomplete. The sdk will filter out this session and will not call back to the upper developers

If lastMsg is null, the message is recalled or the historical messages of this conversation are cleared.

Locale

msgReceiptTime?: number

@Multi_Lang_Tag

Locale

cn 聊天对象所读过的最近一条消息的时间

p2p 会话特有,与 msg.time 对比就能得知某条消息是否被对方已读

被 API MsgServiceInterface.sendMsgReceipt | sendMsgReceipt 和 MsgServiceInterface.sendTeamMsgReceipt | sendTeamMsgReceipt 所更新

Locale

Locale

en Time when the last message read by the user

p2p chat specific properties,can compare it with msg.time to know whether a message has been read by the other party.

Locale

scene: "p2p" | "team" | "superTeam"

@Multi_Lang_Tag

Locale

cn 会话场景

p2p 单聊

team 群组

superTeam 超大群

Locale

Locale

en Conversation scene

p2p: one-to-one chat

team : group chat

superTeam : supergroup chat

Locale

stickTopInfo?: NIM_StickTopSessionInfo

@Multi_Lang_Tag

Locale

cn 云端置顶会话信息。若开通了云端置顶会话功能,且这个会话的确被设置为置顶会话,此对象存在。

Locale

Locale

en The information about a pinned session. If the pinning session feature is enabled, and the session is pinned

Locale

to: string

@Multi_Lang_Tag

Locale

cn 聊天对象,

若 scene 为 p2p 单聊,则 to 为聊天对象的账号

若 scene 为 team 或者 superTeam,则 to 为 群ID

Locale

Locale

en Chat object,

If the scene is one-to-one chat, the “to” field represents the account of the person that the user chats with.

If the scene is group chat or supergroup chat, the “to” field represents the group ID.

Locale

unread: number

@Multi_Lang_Tag

Locale

cn 未读数

Locale

Locale

en Unread count

Locale

unreadMsgs?: IMMessage[]

@Multi_Lang_Tag

Locale

cn 自己还没读过的此会话消息。此字段不希望开发者处理。

Locale

Locale

en The conversation message that you haven't read yet

Locale

updateTime: number

@Multi_Lang_Tag

Locale

cn 更新时间

Locale

Locale

en Update time

Locale

Generated using TypeDoc