setMyPushTriggerOption method

Future<void> setMyPushTriggerOption(
  1. GroupChannelPushTriggerOption option
)

Sets push trigger option of this channel. If channel's push trigger option is set to GroupChannelPushTriggerOption.defaultValue, it works according to the state of PushTriggerOption. If not, push messages will be triggered according to the state of GroupChannelPushTriggerOption.

@param pushTriggerOption PushTriggerOption. Refer to GroupChannelPushTriggerOption.

Implementation

Future<void> setMyPushTriggerOption(
  GroupChannelPushTriggerOption option,
) async {
  sbLog.i(StackTrace.current, 'option: $option');

  final res = await chat.apiClient.send<GroupChannelPushTriggerOption>(
    GroupChannelPushTriggerOptionSetRequest(
      chat,
      channelUrl: channelUrl,
      option: option,
    ),
  );
  myPushTriggerOption = res;
}