Chatroom 类(Web IMLib)

类继承图​

Object→Chatroom

继承关系:Object → Chatroom。该数据结构不包含行为方法,字段与 domain.json → schemas.Chatroom 一一对应。

类说明​

聊天室资料:在线态会话,不落离线历史,默认只广播在线成员;保活/销毁由生命周期策略控制。

项值
类型数据结构(值对象)
字段数8
IDL 定义domain.json → schemas.Chatroom
程序包@ni-paas/im-web
跨端一致性字段名与取值在 7 个平台绑定中一致;仅语言类型映射不同
平台状态已交付

字段概要​

字段类型必填说明
chatroomIdstring是聊天室 ID
namestring是名称
ownerstring否群主 userId
memberCountuint32是成员数量
onlineCountuint32是在线人数
alivebool是聊天室是否存活
createdAtint64是创建时间(epoch ms)
destroyAtint64否自动销毁时间(epoch ms)

详细字段说明​

string chatroomId
必填

聊天室 ID

string name
必填

名称

string owner
可选

群主 userId

uint32 memberCount
必填

成员数量

uint32 onlineCount
必填

在线人数

bool alive
必填

聊天室是否存活

int64 createdAt
必填

创建时间(epoch ms)

int64 destroyAt
可选

自动销毁时间(epoch ms)

相关链接​