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 The custom group ID must be printable ASCII characters (0x20-0x7e) with a maximum length of 48 bytes. It cannot begin with @TGS# so as to avoid confusion with the default group IDs assigned by IM.

◆ groupType

V2TIMString groupType

Group type.

◆ isSupportTopic

bool isSupportTopic

Get supporting topic of not. (valid only for Community)

◆ 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 (Feature Configuration -> Custom Group Field) to set the key value of the custom group field. The key field is of the String type, with a maximum length of 16 bytes.

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 is mainly used for compatibility with V1 and V2. If you are using V2 APIs, you are advised to use the initGroupAttributes API to set group attributes because the API is more flexible (requiring no configuration in the console) and supports a larger storage capacity (up to 16 KB). You are advised to use the initGroupAttributes API to set group attributes because the API is more flexible (requiring no configuration in the console) and supports a larger storage capacity (up to 16 KB).

◆ owner

V2TIMString owner

Group owner ID.

◆ createTime

uint32_t createTime

UTC timestamp of group creation.

◆ groupAddOpt

V2TIMGroupAddOpt groupAddOpt

The approval method of the administrator in the group applying mode, the default value of work group is V2TIM_ GROUP_ ADD_ FORBID (that is, users are not allowed to apply for group membership by default). You can modify this field to open it.

◆ groupApproveOpt

V2TIMGroupAddOpt groupApproveOpt

The approval method of the administrator in the group invitation mode (Supported in 7.1 and later versions)

  • Except for work group, the default value of all other group types is V2TIM_ GROUP_ ADD_ FORBID (that is, users are not allowed to join the group through invitation). You can modify this field to open it.
  • This field is not supported in AVChatRoom、Community and Topics.

◆ lastInfoTime

uint32_t lastInfoTime

UTC timestamp of the group information last modification.

◆ lastMessageTime

uint32_t lastMessageTime

Last time the group sends a message.

◆ memberCount

uint32_t memberCount

Number of members that have joined the group.

◆ onlineCount

uint32_t onlineCount

Number of online group members (It is deprecated, please call API 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: https://intl.cloud.tencent.com/document/product/1047/33529 https://cloud.tencent.com/document/product/269/1502#.E7.BE.A4.E7.BB.84.E9.99.90.E5.88.B6.E5.B7.AE.E5.BC.82

◆ 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

UTC timestamp when the current user joined this group. The time is automatically generated by the system and cannot be set.

◆ enablePermissionGroup

bool enablePermissionGroup

Enable permission group, only supports community from 7.8 version When this feature is enabled, the administrator role will lose its permissions, and you will need to use group default permissions, topic default permissions, and permission groups to manage the group and topic.

◆ defaultPermissions

uint64_t defaultPermissions

Group default permissions, only supports community from 7.8 version When the permission group is enabled (enablePermissionGroup = true), the default permissions for group members who have not joined any permission groups will take effect.

◆ 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;