ChatClient 初始化配置。

interface InitConfig {
    appKey: string;
    enableUserInfoSync?: boolean;
    enableSyncData?: readonly SyncDataType[];
    enableDeliveryReceipt?: boolean;
    deleteConversationOnGroupDestroyed?: boolean;
    syncConversationListConfig?: SyncConversationListConfig;
    useCustomAttachmentUpload?: boolean;
    useFixedDeviceId?: boolean;
    deviceId?: string;
    serviceConfig?: ServiceConfig;
    useReplacedMessageContents?: boolean;
    customDeviceName?: string;
    customOSPlatform?: number;
    uiKitVersion?: string;
    loginExtensionInfo?: string;
    managers?: readonly ManagerRegistration<unknown>[];
    platformAdapterOptions?: CreatePlatformAdapterOptions;
}

Properties

appKey: string

应用唯一标识,格式为 org#app

enableUserInfoSync?: boolean

是否启用用户资料同步增强能力。

enableSyncData?: readonly SyncDataType[]

登录后自动同步的数据类型。

enableDeliveryReceipt?: boolean

是否开启送达回执。开启后,收到单聊消息时 SDK 自动向发送方回送达回执;发送方通过 onMessageDelivered 事件得知消息已送达。

deleteConversationOnGroupDestroyed?: boolean

群组解散时是否自动删除对应的本地群会话,默认为 true

syncConversationListConfig?: SyncConversationListConfig

会话列表同步配置。

useCustomAttachmentUpload?: boolean

是否使用自定义附件上传能力。

useFixedDeviceId?: boolean

是否在同一浏览器内复用固定设备标识。

deviceId?: string

自定义设备标识;未传时使用 SDK 默认值。

serviceConfig?: ServiceConfig

服务接入配置;缺省时使用 SDK 内置 DNS_CONFIG。

useReplacedMessageContents?: boolean

内容审核替换后,是否将替换后的消息回给发送方。

customDeviceName?: string

自定义设备名称;通常与 customOSPlatform 搭配使用。

customOSPlatform?: number

自定义平台编号。

uiKitVersion?: string

UI Kit 版本号,用于上报。

loginExtensionInfo?: string

登录自定义扩展信息。当多设备登录策略导致当前设备被踢时,该扩展字符串会传递给被踢设备,最大长度 1024 字符。

managers?: readonly ManagerRegistration<unknown>[]

初始化时需要自动注册的管理器列表。

platformAdapterOptions?: CreatePlatformAdapterOptions

可选平台适配配置;缺省时 SDK 自动识别运行环境,仅在非标准宿主或需要覆盖能力时传入。