Class OptionsBuilder<T extends OptionsBuilder<T>>

java.lang.Object
it.auties.whatsapp.api.OptionsBuilder<T>
Direct Known Subclasses:
MobileOptionsBuilder, WebOptionsBuilder

public sealed class OptionsBuilder<T extends OptionsBuilder<T>> extends Object permits MobileOptionsBuilder, WebOptionsBuilder
  • Field Details

  • Constructor Details

    • OptionsBuilder

      OptionsBuilder(Store store, Keys keys)
  • Method Details

    • name

      public T name(String name)
      Sets the name to provide to Whatsapp during the authentication process The web api will display this name in the devices section, while the mobile api will show it to the people you send messages to By default, this value will be set to this library's name
      Returns:
      the same instance for chaining
    • autodetectListeners

      public T autodetectListeners(boolean autodetectListeners)
      Sets whether listeners marked with the RegisterListener annotation should be automatically detected and registered By default, this option is enabled
      Returns:
      the same instance for chaining
    • textPreviewSetting

      public T textPreviewSetting(TextPreviewSetting textPreviewSetting)
      Sets whether a preview should be automatically generated and attached to text messages that contain links By default, it's enabled with inference
      Returns:
      the same instance for chaining
    • errorHandler

      public T errorHandler(ErrorHandler errorHandler)
      Sets the error handler for this session
      Returns:
      the same instance for chaining
    • releaseChannel

      public T releaseChannel(UserAgent.ReleaseChannel releaseChannel)
      Sets the release channel
      Returns:
      the same instance for chaining
    • proxy

      public T proxy(URI proxy)
      Sets the proxy to use for the socket
      Returns:
      the same instance for chaining
    • automaticPresenceUpdates

      public T automaticPresenceUpdates(boolean automaticPresenceUpdates)
      Whether presence updates should be handled automatically
      Returns:
      the same instance for chaining
    • checkPatchMacks

      public T checkPatchMacks(boolean checkPatchMacs)
      Sets whether the mac of every app state patch should be validated or not By default, it's set to false
      Returns:
      the same instance for chaining