setAllReceiveMessageOptWithTimestamp method

Future<V2TimCallback> setAllReceiveMessageOptWithTimestamp({
  1. required int opt,
  2. required int startTimeStamp,
  3. required int duration,
})

设置全局消息接收选项 opt 全局消息接收选项,支持两种取值:

startTimeStamp 免打扰开始时间,UTC 时间戳,单位:秒

duration 免打扰持续时长,单位:秒

Implementation

Future<V2TimCallback> setAllReceiveMessageOptWithTimestamp({
  required int opt,
  required int startTimeStamp,
  required int duration,
}) async {
  if (kIsWeb) {
    return TencentCloudChatSdkPlatform.instance
        .setAllReceiveMessageOptWithTimestamp(
        opt: opt, startTimeStamp: startTimeStamp, duration: duration);
  }

  return TIMMessageManager.instance
      .setAllReceiveMessageOptWithTimestamp(
      opt: opt, startTimeStamp: startTimeStamp, duration: duration);
}