TencentImSDKPlugin.v2TIMManager.getGroupManager() core class.initGroupAttributes, setGroupAttributes, and deleteGroupAttributes APIs can be called by a logged-in user up to 10 times every 5 seconds in total in the SDK, after which the error code 8511 will be returned, or 5 times every second in total on the backend, after which the error code 10049 will be returned.getGroupAttributes API can be called by a logged-in user up to 20 times every 5 seconds in the SDK.initGroupAttributes API (Details) to initialize the group attributes, and the original group attributes, if any, will be cleared first.// Initialize the group attributesgroupManager.initGroupAttributes(groupID: "groupID", attributes: {"attr1":""});
setGroupAttributes API (Details) to set the group attributes. If a group attribute doesn't exist, it will be automatically added.// Set the group attributesgroupManager.setGroupAttributes(groupID: "groupID", attributes: {"attr1":""});
deleteGroupAttributes API (Details) to delete a specified group attribute. If keys is null/nil, all the group attributes will be cleared.// Delete the group attributesgroupManager.deleteGroupAttributes(groupID: "groupID", keys: ['attr1','attr2']);
getGroupAttributes API (Details) to get a specified group attribute. If keys is null/nil, all the group attributes will be obtained.// Get the group attributesV2TimValueCallback<Map<String, String>> attrs = await groupManager.getGroupAttributes(groupID: "groupID");
addGroupListener to add a group event listener, all the group attributes will be called back through onGroupAttributeChanged (Details) when a group attribute is changed.TencentImSDKPlugin.v2TIMManager.addGroupListener(listener: V2TimGroupListener(onGroupAttributeChanged: (groupID, groupAttributeMap) {// A group attribute is changed.},));
Feedback