setGroupReceiveMessageOpt method
Future<V2TimCallback>
setGroupReceiveMessageOpt({
- required String groupID,
- required ReceiveMsgOptEnum opt,
修改群消息接收选项
opt
消息接收选项:
- ReceiveMsgOptEnum.V2TIM_RECEIVE_MESSAGE 在线正常接收消息,离线时会有厂商的离线推送通知
- ReceiveMsgOptEnum.V2TIM_NOT_RECEIVE_MESSAGE 不会接收到群消息
- ReceiveMsgOptEnum.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE 在线正常接收消息,离线不会有推送通知
- ReceiveMsgOptEnum.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE_EXCEPT_AT 在线正常接收消息,离线只推送@消息
- ReceiveMsgOptEnum.V2TIM_NOT_RECEIVE_MESSAGE_EXCEPT_AT 在线和离线都只接收@消息
Implementation
Future<V2TimCallback> setGroupReceiveMessageOpt({
required String groupID,
required ReceiveMsgOptEnum opt,
}) async {
if (kIsWeb) {
return TencentCloudChatSdkPlatform.instance.setGroupReceiveMessageOpt(groupID: groupID, opt: opt.index);
}
return TIMMessageManager.instance.setGroupReceiveMessageOpt(groupID: groupID, opt: opt);
}