TencentImSDKPlugin.v2TIMManager.getGroupManager()中。initGroupAttributes、setGroupAttributes、deleteGroupAttributes 接口合并计算,SDK 限制为单个登录用户 5 秒 10 次,超过后回调 8511 错误码;后台限制单个登录用户 1 秒 5 次,超过后返回 10049 错误码。getGroupAttributes 接口 SDK 限制为单个登录用户 5 秒 20 次。// 初始化群属性groupManager.initGroupAttributes(groupID: "groupID", attributes: {"attr1":""});
// 设置群属性groupManager.setGroupAttributes(groupID: "groupID", attributes: {"attr1":""});
// 删除群属性groupManager.deleteGroupAttributes(groupID: "groupID", keys: ['attr1','attr2']);
// 获取群属性V2TimValueCallback<Map<String, String>> attrs = await groupManager.getGroupAttributes(groupID: "groupID");
addGroupListener 添加了群组事件监听器,群属性有任何的更新变化,都会通过 onGroupAttributeChanged (Details) 回调出来所有的群属性字段。TencentImSDKPlugin.v2TIMManager.addGroupListener(listener: V2TimGroupListener(onGroupAttributeChanged: (groupID, groupAttributeMap) {// 群属性变更},));
文档反馈