Class
V2TIMGroupInfo
public class V2TIMGroupInfo
Definition of V2TIMGroupInfo
Initializers
init()
public init()
Properties
description
public var description: String
isSupportTopic
public var isSupportTopic: Bool
Whether to enable topic creation for a community group
customInfo
public var customInfo: Dictionary<String, Data>?
Get custom group fields
To set a custom group field, perform the following steps:
1. Go to the [console](https://console.tencentcloud.com/im) (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. - Warning: 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).
groupAddOpt
public var groupAddOpt: V2TIMGroupAddOpt
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
public var groupApproveOpt: V2TIMGroupAddOpt
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
public var lastInfoTime: UInt
Get the UTC timestamp when the group information was last modified
lastMessageTime
public var lastMessageTime: UInt
Get the last time a message was sent in the group
onlineCount
@available(*, deprecated, message: "use getGroupOnlineMemberCount(groupID:succ:fail:) instead")
public var onlineCount: UInt
Get the number of online group members (This has been deprecated. Please call getGroupOnlineMemberCount instead.)
role
public var role: UInt
Group member role of current user(V2TIMGroupMemberRole). To switch the role, please call the setGroupMemberRole API.
recvOpt
public var recvOpt: V2TIMReceiveMessageOpt
Current user's message receiving option in the group. To modify the group message receiving option, please call the setGroupReceiveMessageOpt API.
joinTime
public var joinTime: UInt
Get the time when the current user joined the group. The time is automatically generated by the system and cannot be modified.
enablePermissionGroup
public var enablePermissionGroup: Bool
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
public var defaultPermissions: UInt64
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).