数据更新
Web IMKit 除了提供 Hooks 函数外,还提供了一系列数据更新方法,便于业务层在特定场景下及时更新 Web IMKit 内部的数据缓存。
提示
以下代码示例中提到的 kitApp 均为 Web IMKit 初始化后获取到的 RCKitApplication 类实例。
更新用户信息
updateUserProfile 方法用于更新用户信息,如用户昵称、头像等。
JavaScript
kitApp.updateUserProfile({
userId: 'userId',
name: '', // 用户名称
portraitUri: '', // 用户头像
});