TencentImSDKPlugin.v2TIMManager.getGroupManager()
core class.getGroupsInfo
(Details) to get the group profile. This API supports passing in multiple groupID
values at a time to batch get group profiles.// Get the group profileV2TimValueCallback<List<V2TimGroupInfoResult>> groupinfos = await groupManager.getGroupsInfo(groupIDList: ['groupid1']);
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).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 |
groupManager.setGroupInfo(info: V2TimGroupInfo.fromJson({"groupAddOpt":GroupAddOptTypeEnum.V2TIM_GROUP_ADD_AUTH// ...Other profiles}));// CallbackTencentImSDKPlugin.v2TIMManager.addGroupListener(listener: V2TimGroupListener(onGroupInfoChanged: ((groupID, changeInfos) {// The group information was changed.})));
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. |
V2TIMReceiveMessageOpt
options can be used to implement group message notification muting:V2TIM_NOT_RECEIVE_MESSAGE
, no group message will be received, and the conversation list will not be updated.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE
.unreadCount
(Details) in V2TIMConversation
.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE
based on the recvOpt
(Details) of V2TIMConversation
.// Set the group message receiving optiongroupManager.setGroupInfo(info: V2TimGroupInfo.fromJson({"groupAddOpt":GroupAddOptTypeEnum.V2TIM_GROUP_ADD_AUTH// ...Other profiles}));
Was this page helpful?