please select
  • UIKit
  • SDK
  • Server APIs
Chat/
SDK/
Flutter/
Group/
SDK
  • Install Chat SDK
    • Install
  • Initialize Chat SDK
    • Initialize
  • Login And Logout
    • Login and Logout
  • Message
    • Message Overview
    • Sending Message
    • Receiving Message
    • Historical Message
    • Forwarding Message
    • Modifying Message
    • Message Inserting
    • Deleting Message
    • Clearing Messages
    • Recalling Message
    • Online Message
    • Read Receipt
    • Querying Message
    • Group @ Message
    • Targeted Group Message
    • Notification Muting
    • Message Extension
  • Conversation
    • Conversation Overview
    • Conversation List
    • Getting Conversation
    • Conversation Unread Count
    • Pinning Conversation to the Top
    • Deleting Conversation
    • Conversation Draft
    • Conversation Group
  • Group
    • Group Overview
    • Group Management
    • Group Profile
    • Group Member Management
    • Group Member Profile
    • Custom Group Attribute
  • User
    • User Profile
    • Friend Management
    • Friend List
    • Blocklist
  • Offline Push
    • Offline Push
  • Signaling
    • Signaling Management
  • Local Search
    • Searching for Message
    • Searching for Friend
    • Searching Group
    • Searching for Group Member
  • API Reference
    • Client APIs
  • Guideline for Beginners
  • Console Guide
    • Creating and Upgrading an Application
    • Basic Configuration
    • Feature Configuration
    • Account Management
    • Group Management
    • Webhook Configuration
  • Product Introduction
    • Message Management
      • One-to-One Message
      • Message Storage
      • Offline Push
      • Group Message
      • Message Formats
    • Account System
      • Login Authentication
      • Online Status Management
    • Group Related
      • Group System
      • Group Management
    • User Profile and Relationship Chain
      • Profile Management
      • Relationship Chain Management
  • Purchase Guide
    • Billing Overview
    • Pricing
  • Error Codes

Group Profile

Feature Description

The group profile refers to the information about the group, which can be obtained through the method in the TencentImSDKPlugin.v2TIMManager.getGroupManager() core class.


Getting the Group Profile

Call getGroupsInfo (Details) to get the group profile. This API supports passing in multiple groupID values at a time to batch get group profiles.
Sample code:
// Get the group profile
V2TimValueCallback<List<V2TimGroupInfoResult>> groupinfos = await groupManager.getGroupsInfo(groupIDList: ['groupid1']);


Modifying the Group Profile

Call setGroupInfo (Details) to modify the group profile.
If you have called addGroupListener to add a group event listener in advance, after the group profile is modified, all the group members will receive the onGroupInfoChanged callback (Details).
Member roles that can modify the group profile vary by group type as follows:
Group Type
Member Roles Allowed to Modify the Basic Group Profile
Work group (Work)
All group members
Public group (Public)
Group owner and admin
Meeting group (Meeting)
Group owner and admin
Community (Community)
Group owner and admin
Audio-video group (AVChatRoom)
Group owner
Sample code:
groupManager.setGroupInfo(info: V2TimGroupInfo.fromJson({
"groupAddOpt":GroupAddOptTypeEnum.V2TIM_GROUP_ADD_AUTH
// ...Other profiles
}));
// Callback
TencentImSDKPlugin.v2TIMManager.addGroupListener(listener: V2TimGroupListener(onGroupInfoChanged: ((groupID, changeInfos) {
// The group information was changed.
})));

Setting the Group Message Receiving Option

Any group member can call the setGroupReceiveMessageOpt API (Details) to change the group message receiving option.
V2TIMReceiveMessageOpt has the following options:
Message Receiving Option
Description
ReceiveMsgOptEnum.V2TIM_RECEIVE_MESSAGE
Messages will be received when the user is online, and push notifications will be received when the user is offline.
ReceiveMsgOptEnum.V2TIM_NOT_RECEIVE_MESSAGE
No group messages will be received.
ReceiveMsgOptEnum.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE
Messages will be received when the user is online, and no push notifications will be received when the user is offline.
Different V2TIMReceiveMessageOpt options can be used to implement group message notification muting:
No group messages will be received. With the group message receiving option set to V2TIM_NOT_RECEIVE_MESSAGE, no group message will be received, and the conversation list will not be updated.
Group messages will be received but will not be notified to the user, and a badge without the unread count will be displayed on the conversation list UI.
1. The group message receiving option is set to V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE.
2. When the receiver receives a new group message and needs to update the conversation list, it can get the unread count through unreadCount (Details) in V2TIMConversation.
3. The receiver displays a badge rather than the unread count when identifying the group message receiving option as V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE based on the recvOpt (Details) of V2TIMConversation.
Note:
As this method requires the unread count feature, it applies only to work groups (Work) and public groups (Public).
Sample code:
// Set the group message receiving option
groupManager.setGroupInfo(info: V2TimGroupInfo.fromJson({
"groupAddOpt":GroupAddOptTypeEnum.V2TIM_GROUP_ADD_AUTH
// ...Other profiles
}));