Breaking changes
AbPropsCache now takes typed AbProp constants
The hand-maintained wacore::iq::props::config_codes module is gone. Cache lookups now take a typed AbProp from the vendored wacore::iq::abprops registry instead of a raw u32 code, which lets the cache reuse each flag’s value_type and default from the WA Web bundle. If you were calling client.ab_props().is_enabled(PRIVACY_TOKEN_ON_GROUP_CREATE) against a numeric constant, switch to the named flag:
Old (config_codes::*) | New (abprops::*) |
|---|---|
PRIVACY_TOKEN_ON_ALL_1_ON_1_MESSAGES | web::PRIVACY_TOKEN_SENDING_ON_ALL_1_ON_1_MESSAGES |
PRIVACY_TOKEN_ON_GROUP_CREATE | web::PRIVACY_TOKEN_SENDING_ON_GROUP_CREATE |
PRIVACY_TOKEN_ON_GROUP_PARTICIPANT_ADD | web::PRIVACY_TOKEN_SENDING_ON_GROUP_PARTICIPANT_ADD |
PRIVACY_TOKEN_ONLY_CHECK_LID | wacore::iq::props::stale::PRIVACY_TOKEN_ONLY_CHECK_LID |
New features
Vendored typed A/B-props registrywacore::iq::abprops ships an auto-generated snapshot of every flag in WhatsApp Web’s WAWebABPropsConfigs registry (~1,775 entries today). Each flag is a typed AbProp const with its wire name, numeric code, value type, and default — so you can gate your own code on the same experiment flags WhatsApp Web reads without copy-pasting codes from the bundle. Only the consts you reference are linked into the binary.
AbPropsCache helpers: get, get_int, watch, watch_many
client.ab_props().get(prop)returns the rawOption<CompactString>value the server sent.client.ab_props().get_int(prop)returns the parsedi64, falling back to the registry default when the server omits the flag or it isn’t an int. The internaltc_tokensend path uses this to follow WA Web’sTCTOKEN_DURATION/TCTOKEN_NUM_BUCKETSrollouts automatically.client.ab_props().watch(prop)/watch_many(&[prop, …])add flags to the cache’s interest set so the nextfetch_props()retains their values. By default only the flags inwacore::iq::props::WATCHED(the ones the library reads) are kept; everything else is discarded to avoid allocating for the ~2,000 unused props.
watch before the first fetch_props() (i.e. before client.connect()), otherwise the flag’s value will be dropped from the very first response.
See AB props cache and the abprops registry for the full API.