setReceiveMessageOpt method

Future<V2TimCallback> setReceiveMessageOpt({
  1. String? groupID,
  2. int? opt,
})

修改群消息接收选项

参数

opt	三种类型的消息接收选项: V2TIMGroupInfo.V2TIM_GROUP_RECEIVE_MESSAGE:在线正常接收消息,离线时会有厂商的离线推送通知 V2TIMGroupInfo.V2TIM_GROUP_NOT_RECEIVE_MESSAGE:不会接收到群消息 V2TIMGroupInfo.V2TIM_GROUP_RECEIVE_NOT_NOTIFY_MESSAGE:在线正常接收消息,离线不会有推送通知

Implementation

Future<V2TimCallback> setReceiveMessageOpt({
  String? groupID,
  int? opt,
}) async {
  return V2TimCallback.fromJson(
    formatJson(
      await _channel.invokeMethod(
        "setReceiveMessageOpt",
        buildParam(
          {
            "groupID": groupID,
            "opt": opt,
          },
        ),
      ),
    ),
  );
}