IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMGroupInfo

Detailed Description

Definition of V2TIMGroupInfo.

Public Member Functions

 V2TIMGroupInfo ()
 
 V2TIMGroupInfo (const V2TIMGroupInfo &groupInfo)
 
 ~V2TIMGroupInfo ()
 

Data Fields

V2TIMString groupID
 
V2TIMString groupType
 
bool isSupportTopic
 
V2TIMString groupName
 
V2TIMString notification
 
V2TIMString introduction
 
V2TIMString faceURL
 
bool allMuted
 
V2TIMCustomInfo customInfo
 
V2TIMString owner
 
uint32_t createTime
 
V2TIMGroupAddOpt groupAddOpt
 
V2TIMGroupAddOpt groupApproveOpt
 
uint32_t lastInfoTime
 
uint32_t lastMessageTime
 
uint32_t memberCount
 
uint32_t onlineCount
 
uint32_t memberMaxCount
 
uint32_t role
 
V2TIMReceiveMessageOpt recvOpt
 
uint32_t joinTime
 
bool enablePermissionGroup
 
uint64_t defaultPermissions
 
uint32_t modifyFlag
 

Constructor & Destructor Documentation

◆ V2TIMGroupInfo() [1/2]

◆ V2TIMGroupInfo() [2/2]

V2TIMGroupInfo ( const V2TIMGroupInfo groupInfo)

◆ ~V2TIMGroupInfo()

Field Documentation

◆ groupID

V2TIMString groupID

Group ID A custom group ID must be printable ASCII characters (0x20-0x7e) with a maximum length of 48 bytes. To avoid confusion with the default group IDs assigned by Chat, do not start the custom ID with @TGS.

◆ groupType

V2TIMString groupType

Group type.

◆ isSupportTopic

bool isSupportTopic

Whether to enable topic creation for a community group.

◆ groupName

V2TIMString groupName

Group name The maximum length of the group name is 100 bytes, encoded in UTF-8.

◆ notification

V2TIMString notification

Group notice The maximum length of the group notice is 400 bytes, encoded in UTF-8.

◆ introduction

V2TIMString introduction

Group introduction The maximum length of the group introduction is 400 bytes, encoded in UTF-8.

◆ faceURL

V2TIMString faceURL

Group profile photo URL The maximum length of the group profile photo URL is 500 bytes, encoded in UTF-8.

◆ allMuted

bool allMuted

Whether to mute all group members.

◆ customInfo

V2TIMCustomInfo customInfo

Get custom group fields To set a custom group field, perform the following steps:

1. Go to the console (Configuration -> Group configuration -> Custom Group Field) to set the key (string, max 16 bytes) of the custom group field.

2. Call the setGroupInfo API to set the field. The field value is of the NSData type, with a maximum length of 512 bytes.

Attention
This field mainly serves to make V1 and V2 compatible with each other. If you are using V2, we recommend you use the initGroupAttributes API to set group attributes. It is more flexible to use, does not require console configuration, and supports a larger size (up to 16 KB).

◆ owner

V2TIMString owner

Group owner ID.

◆ createTime

uint32_t createTime

UTC timestamp of group creation.

◆ groupAddOpt

V2TIMGroupAddOpt groupAddOpt

Get or set whether admin approval is required to join the group This API can be called during group creation or group information modification. For work groups, the default value is V2TIM_GROUP_ADD_FORBID (users cannot request to join the group), which can be modified.

◆ groupApproveOpt

V2TIMGroupAddOpt groupApproveOpt

Get or set the approval method for inviting new group members. This field can be set during group creation or group information modification. Except for work groups, the default value for all group types is V2TIM_GROUP_ADD_FORBID (no one can be invited to the group). For AVChatRoom, Community, and topics, the default value cannot be modified.

◆ lastInfoTime

uint32_t lastInfoTime

Get the UTC timestamp when the group information was last modified.

◆ lastMessageTime

uint32_t lastMessageTime

Get the last time a message was sent in the group.

◆ memberCount

uint32_t memberCount

Number of members that have joined the group.

◆ onlineCount

uint32_t onlineCount

Get the number of online group members (This has been deprecated. Please call getGroupOnlineMemberCount instead.)

◆ memberMaxCount

uint32_t memberMaxCount

Maximum number of group members allowed to join

Attention
For details on the number of members allowed for each group type, please see here

◆ role

uint32_t role

Group member role of current user. To switch the role, please call the setGroupMemberRole API.

◆ recvOpt

Current user's message receiving option in the group. To modify the group message receiving option, please call the setGroupReceiveMessageOpt API.

◆ joinTime

uint32_t joinTime

Get the time when the current user joined the group. The time is automatically generated by the system and cannot be modified.

◆ enablePermissionGroup

bool enablePermissionGroup

Whether to enable permission groups (only supported for community groups since v7.8) When permission groups are enabled, admin permissions will become invalid, and communities and topics will be managed by group permissions, topic permissions, and permission groups.

◆ defaultPermissions

uint64_t defaultPermissions

The default permissions (only supported for community groups since v7.8) This API sets the default permissions for group members who have not joined any permission groups (only when permission groups are enabled, i.e., enablePermissionGroup = true).

◆ modifyFlag

uint32_t modifyFlag

Group info modification flag Enumeration V2TIMGroupInfoModifyFlag lists which fields support modification, if you modify group information, please set the value of this field, if you modify multiple fields at the same time, multiple enumeration values ​​are combined by bitwise OR, for example, modify the group name and avatar at the same time. info.groupName = "new group name"; info.faceURL = "new face url"; info.modifyFlag = V2TIM_GROUP_INFO_MODIFY_FLAG_GROUP_NAME | V2TIM_GROUP_INFO_MODIFY_FLAG_FACE_URL;