GroupGroupInitGroupAttributes, GroupGroupDeleteGroupAttributes 和 GroupGroupGetGroupAttributes 。GroupInitGroupAttributes、setGroupAttributes、GroupDeleteGroupAttributes 接口合并计算,SDK 限制为单个登录用户 5 秒 10 次,超过后回调 8511 错误码;后台限制单个登录用户 1 秒 5 次,超过后返回 10049 错误码。GroupGetGroupAttributes 接口 SDK 限制为单个登录用户 5 秒 20 次。// 初始化群属性GroupAttributes attributes = new GroupAttributes{group_atrribute_key = "key",group_atrribute_value = "value"};TIMResult res = TencentIMSDK.GroupInitGroupAttributes(group_id, attributes, (int code, string desc, string user_data)=>{// 处理异步逻辑});
// 删除群属性GroupAttributes attributes = new List<string>{"attr1"};TIMResult res = TencentIMSDK.GroupDeleteGroupAttributes(group_id, attributes, (int code, string desc, string user_data)=>{// 处理异步逻辑});
// 获取群属性GroupAttributes attributes = new List<string>{"attr1"};TIMResult res = TencentIMSDK.GroupGetGroupAttributes(group_id, attributes, (int code, string desc, List<GroupAttributes> attributes, string user_data)=>{// 处理异步逻辑});
SetGroupAttributeChangedCallback 添加了群组事件监听器,群属性有任何的更新变化,都会通过 GroupAttributeChangedCallback (Details) 回调出来所有的群属性字段。TencentIMSDK.SetGroupAttributeChangedCallback((string group_id, List<GroupAttributes> group_attributes, string user_data)=>{// 处理回调逻辑});
文档反馈