Connection configuration defaults and platform mapping.
print_qr_in_terminal remains only as a compatibility knob with Baileys rc.9.
It is deprecated and does not print QR codes automatically; consumers should
handle connection.update.qr themselves.
Summary
Functions
Default logic to determine if a history sync message should be processed. By default, only non-FULL syncs are processed inline.
Returns the numeric device property platform type for a given browser string.
Defaults to 1 (CHROME) if missing.
Create a new Config with default options.
Accepts a keyword list of overrides.
Returns the effective initial QR timeout, honoring the Baileys-style single override when configured.
Returns the effective QR refresh timeout, honoring the Baileys-style single override when configured.
Returns the platform ID block identifier for device properties based on browser name.
Returns the internal platform symbol for a given browser name string.
Returns :UNKNOWN if the browser name is not recognized.
Returns whether the runtime should auto-reconnect for the given disconnect reason and upcoming retry attempt.
Returns the numeric sub-platform ID for web client features (e.g. Mac/Windows).
Types
@type platform() ::
:CHROME
| :FIREFOX
| :SAFARI
| :EDGE
| :OPERA
| :DESKTOP
| :DARWIN
| :WIN32
| :LINUX
| :UNKNOWN
@type reconnect_policy() :: :disabled | :restart_required | :all_non_logged_out
@type t() :: %BaileysEx.Connection.Config{ browser: browser(), cached_group_metadata: cached_group_metadata_fun() | nil, connect_timeout_ms: pos_integer(), country_code: String.t(), default_query_timeout_ms: pos_integer(), enable_auto_session_recreation: boolean(), enable_recent_message_cache: boolean(), fire_init_queries: boolean(), initial_sync_timeout_ms: pos_integer(), keep_alive_interval_ms: pos_integer(), mark_online_on_connect: boolean(), max_msg_retry_count: pos_integer(), max_retries: non_neg_integer(), pairing_qr_initial_timeout_ms: pos_integer(), pairing_qr_refresh_timeout_ms: pos_integer(), pairing_qr_timeout_ms: pos_integer() | nil, print_qr_in_terminal: boolean(), reconnect_policy: reconnect_policy(), retry_delay_ms: pos_integer(), retry_request_delay_ms: pos_integer(), should_sync_history_message: should_sync_history_message_fun(), sync_full_history: boolean(), validate_patch_macs: boolean(), validate_snapshot_macs: boolean(), version: version(), ws_url: String.t() }
@type version() :: [non_neg_integer()]
Functions
Default logic to determine if a history sync message should be processed. By default, only non-FULL syncs are processed inline.
@spec device_props_platform_type(String.t()) :: non_neg_integer()
Returns the numeric device property platform type for a given browser string.
Defaults to 1 (CHROME) if missing.
Create a new Config with default options.
Accepts a keyword list of overrides.
@spec pairing_qr_initial_timeout(t()) :: pos_integer()
Returns the effective initial QR timeout, honoring the Baileys-style single override when configured.
@spec pairing_qr_refresh_timeout(t()) :: pos_integer()
Returns the effective QR refresh timeout, honoring the Baileys-style single override when configured.
Returns the platform ID block identifier for device properties based on browser name.
Returns the internal platform symbol for a given browser name string.
Returns :UNKNOWN if the browser name is not recognized.
@spec should_reconnect?(t(), term(), non_neg_integer()) :: boolean()
Returns whether the runtime should auto-reconnect for the given disconnect reason and upcoming retry attempt.
@spec web_sub_platform(t()) :: non_neg_integer()
Returns the numeric sub-platform ID for web client features (e.g. Mac/Windows).