Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
6eefbff
proto: update to v1045649367
tulir Aug 20, 2026
4fa3462
client: don't reuse handler queue between connections
tulir Aug 21, 2026
72f22e6
download: ignore unencrypted media keys
tulir Aug 21, 2026
4650ea9
dependencies: bump minimum Go version to 1.26
tulir Aug 21, 2026
d1cc3c0
ci: disable goimports on go 1.26
tulir Aug 21, 2026
33cfac5
ci: enable staticcheck
tulir Aug 21, 2026
0fadda7
client,socket: use correct context for noise socket frames
tulir Aug 28, 2026
1f6240e
download: also ignore unencrypted media keys for thumbnails
tulir Sep 3, 2026
de26b4a
proto: update to v1046691727
tulir Sep 3, 2026
bdd4e83
group: make delete reason optional
tulir Sep 4, 2026
0ca8346
client: guess correct own ID in ParseWebMessage
tulir Sep 4, 2026
28bfe53
client: ensure stream error is handled before reconnecting
tulir Sep 4, 2026
57796d3
group: deprecate duplicate topic method
tulir Sep 8, 2026
30593f2
proto: update to v1047068806
tulir Sep 9, 2026
9ec8f76
pair: add untested support for companion_reg_refresh
tulir Sep 9, 2026
b25a56d
send: add chat JID in SendResponse (#1258)
andreyxaxa Sep 9, 2026
f6934a9
message: parse more kinds of bot nodes
tulir Sep 14, 2026
398ef18
appstate: save wasa root secrets
tulir Sep 14, 2026
9120a3f
proto: update to v1047451014
tulir Sep 14, 2026
19c6103
message: prefer reading participant_pn for alt jid
tulir Sep 14, 2026
0d3b644
message: try both message IDs for decrypting bot messages
tulir Sep 14, 2026
a8b2033
download: add nil check for sticker pack download
tulir Sep 15, 2026
60027b0
qrchan: add missing return
tulir Sep 15, 2026
320ff7e
appstate: log when storing wasa root secrets
tulir Sep 15, 2026
9127869
message: handle root secret distribute messages properly
tulir Sep 15, 2026
f376da2
message: handle stateless pkmsgs correctly
tulir Sep 15, 2026
2375e17
dependencies: update
tulir Sep 16, 2026
f00dd61
.github: make contributing.md more visible
tulir Sep 16, 2026
2e338d0
proto: update to v1047769893
tulir Sep 17, 2026
0057a82
handshake: fail if client payload is nil
tulir Sep 19, 2026
35ae409
types: add structs for rich response json
tulir Sep 21, 2026
b3832c2
prekeys: add event to signal first prekey upload
tulir Sep 25, 2026
2901754
types/richresponse: fix parsing view models
tulir Sep 27, 2026
45cfce0
types/richresponse: preserve typename when re-marshaling
tulir Sep 27, 2026
d9538ee
proto: update to v1048620361
tulir Sep 28, 2026
35f522c
types/richresponse: fix unmarshaling text entities
tulir Sep 28, 2026
8b41cfe
send,appstate: store active WASA root secret for sending messages to …
iFixRobots Sep 29, 2026
b20fb47
user: add dhash parameter to GetBlocklist
tulir Oct 5, 2026
f331563
socket: fix length calculation for split frames
tulir Oct 5, 2026
68df7a5
proto: update to v1049294120
tulir Oct 5, 2026
6bb48c0
receipt: handle retry receipts synchronously when sync ack is enabled…
Fizzadar Oct 5, 2026
4b7a1ef
user: parse blocklist data fully
tulir Oct 6, 2026
9399289
user: actually send dhash in blocklist update request
tulir Oct 6, 2026
3bc895e
appstate: dispatch sync error if fetching fails
tulir Oct 6, 2026
c386243
proto: update to v1049558099
tulir Oct 7, 2026
dc52248
Merge upstream and address PR 45 review findings
purpshell Oct 10, 2026
39ba534
Pin staticcheck snapshot compatible with Go 1.27.2
purpshell Oct 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@ env:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
go-version: ["1.25", "1.26"]
name: Build ${{ matrix.go-version == '1.26' && '(latest)' || '(old)' }}
go-version: ["1.26", "1.27"]
name: Build ${{ matrix.go-version == '1.27' && '(latest)' || '(old)' }}

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@v7
with:
go-version: ${{ matrix.go-version }}

Expand All @@ -31,11 +35,16 @@ jobs:
- name: Test
run: go test -v ./...

- name: Install goimports
- name: Install dependencies
run: |
# x/tools v0.50.0+ requires Go 1.26; pin the last release that builds on the old matrix entry.
go install golang.org/x/tools/cmd/goimports@v0.49.0
go install golang.org/x/tools/cmd/goimports@v0.51.0
# Staticcheck v0.8.1 cannot read Go 1.27.2 export data. Pin the
# upstream snapshot using x/tools v0.51.0, which supports it.
go install honnef.co/go/tools/cmd/staticcheck@v0.7.0-0.dev.0.20261009230814-452d5bb86b45
export PATH="$HOME/go/bin:$PATH"

- name: Run pre-commit
uses: pre-commit/action@v3.0.1
env:
# go 1.26's formatter doesn't agree with 1.27 on some things
SKIP: ${{ matrix.go-version == '1.26' && 'go-imports-repo' || '' }}
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ repos:
- "github.com/polymorfa/hypermeow"
- "-w"
- id: go-vet-repo-mod
# TODO enable this
#- id: go-staticcheck-repo-mod
- id: go-staticcheck-repo-mod
- id: go-mod-tidy

- repo: https://github.com/beeper/pre-commit-go
rev: v0.4.2
hooks:
# TODO enable this
#- id: zerolog-ban-msgf
- id: zerolog-ban-msgf
- id: zerolog-use-stringer
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@ All notable HyperMeow changes are documented here. HyperMeow uses commit pseudo-

### Fixed

- Keep connection handler completion pending until an active handler exits, and process retired stream errors before automatic reconnect decisions. Manual disconnect retains its five-second wait bound.
- Keep the newest pairing secret through bursts of rotation notifications and refresh the active QR code.
- Report the destination in `SendFBMessage` responses and decrypt full bot edits using their target message ID.
- Dispatch full-sync fetch errors after releasing the app-state sync lock so callbacks can retry.
- Preserve rich-response JSON objects and type names during round trips, and return malformed known-value decoding errors.

- Sending a message wrapped in `AssociatedChildMessage` (for example the HD half of an image or video dual upload) now derives the stanza `type` and enc `mediatype` from the child, as WhatsApp Web does, so an HD image child is sent as `type="media"` with `mediatype="image"` instead of `type="text"`. Retry receipts use the same attributes.

### Changed

- Sync upstream protocol definitions and runtime changes through `c386243a72bacad080ba2938b37e1e4e0f1ca3b2`, while retaining HyperMeow's module path, Signal fork, bounded queues, and SQL batching.
- Require Go 1.26 and select Go 1.27.1 as the preferred toolchain.
- Add `SendResponse.Chat`, `Client.PreKeysUploaded`, pairing-secret rotation events, rich-response types, and bot root-secret methods on `store.ChatSettingsStore`. SQL-backed stores upgrade to schema version 19.
- Deprecate `SetGroupDescription` in favor of `SetGroupTopic`.

- `events.Message.UnwrapRaw` opens `AssociatedChildMessage`, as WhatsApp Web opens it as a future-proof wrapper, and sets the new `IsAssociatedChild` flag. The wrapper's `MessageContextInfo` (including `messageAssociation` and its parent key) is overlaid onto the child's context field by field, wrapper fields winning, as WhatsApp Web does; `RawMessage` is left unmodified. Consumers that inspected `Message.AssociatedChildMessage` after unwrapping must check `IsAssociatedChild` or `RawMessage` instead.

### Documentation
Expand Down
File renamed without changes.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The upstream project remains the smaller choice for applications that only need

## Why HyperMeow instead of upstream WhatsMeow?

This comparison was last verified against upstream `main` at [`a23afe3`](https://github.com/tulir/whatsmeow/commit/a23afe3171803f34d6761979988b9d2275e961c7) on 2026-08-11. Each upstream sync must update this section when the difference changes.
This comparison was last verified against upstream `main` at [`c386243`](https://github.com/tulir/whatsmeow/commit/c386243a72bacad080ba2938b37e1e4e0f1ca3b2) on 2026-10-10. Each upstream sync must update this section when the difference changes.

| Area | HyperMeow advantage over upstream `main` |
| --- | --- |
Expand Down Expand Up @@ -43,6 +43,8 @@ The complete three-repeat system matrix documents allocation, RSS, CPU, latency,

## Install

HyperMeow requires Go 1.26 or newer; the module selects Go 1.27.1 as its preferred toolchain.

Install the newest reviewed commit from the authoritative `main` branch:

```sh
Expand Down Expand Up @@ -92,6 +94,20 @@ HyperMeow retains upstream's core support for:

New exported functionality is additive unless called out in the [changelog](CHANGELOG.md).

`SendMessage` and `SendFBMessage` return the destination used for sending in
`SendResponse.Chat`. `GetQRChannel` refreshes its active QR code when pairing
secrets rotate. Full-sync fetch errors emit `events.AppStateSyncError` after
releasing the sync lock, so a handler can retry the fetch.

The `types/richresponse` package decodes rich bot responses. Known primitives
retain their type names during JSON round trips; unknown primitives, view models,
and text-entity metadata retain their raw JSON. Malformed known values return a
decode error.

Custom `store.ChatSettingsStore` implementations must add `PutWASARootSecretID`
and `GetWASARootSecretID` for bot root-secret state. `sqlstore` adds this field
through schema version 19; its existing migrations remain unchanged.

## Discord

Join the [WhatsApp Web ecosystem Discord](https://whiskey.so/discord) and visit
Expand Down
44 changes: 43 additions & 1 deletion appstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
waBinary "github.com/polymorfa/hypermeow/binary"
"github.com/polymorfa/hypermeow/proto/waE2E"
"github.com/polymorfa/hypermeow/proto/waServerSync"
"github.com/polymorfa/hypermeow/proto/waSyncAction"
"github.com/polymorfa/hypermeow/store"
"github.com/polymorfa/hypermeow/types"
"github.com/polymorfa/hypermeow/types/events"
Expand All @@ -44,7 +45,13 @@ func (cli *Client) fetchAppState(ctx context.Context, name appstate.WAPatchName,
return nil, ErrClientIsNil
}
cli.appStateSyncLock.Lock()
defer cli.appStateSyncLock.Unlock()
var syncError *events.AppStateSyncError
defer func() {
cli.appStateSyncLock.Unlock()
if syncError != nil {
cli.dispatchEvent(syncError)
}
}()
if fullSync {
err := cli.Store.AppState.DeleteAppStateVersion(ctx, string(name))
if err != nil {
Expand Down Expand Up @@ -73,6 +80,9 @@ func (cli *Client) fetchAppState(ctx context.Context, name appstate.WAPatchName,
for hasMore {
patches, err := cli.fetchAppStatePatches(ctx, name, state.Version, wantSnapshot)
if err != nil {
if fullSync && ctx.Err() == nil && cli.BackgroundEventCtx.Err() == nil {
syncError = &events.AppStateSyncError{Name: name, FullSync: fullSync, Error: err}
}
return nil, fmt.Errorf("failed to fetch app state %s patches: %w", name, err)
} else if !wantSnapshot && patches.Snapshot != nil {
return nil, fmt.Errorf("server unexpectedly returned snapshot for %s without asking", name)
Expand Down Expand Up @@ -473,6 +483,38 @@ func (cli *Client) dispatchAppState(ctx context.Context, name appstate.WAPatchNa
Action: mutation.Action.GetQuickReplyAction(),
FromFullSync: fullSync,
}
case appstate.IndexWasaRootSecretAction:
if len(mutation.Index) < 2 {
return
}
botJID, _ := types.ParseJID(mutation.Index[1])
ownLID := cli.getOwnLID()
inputSecrets := mutation.Action.GetWasaRootSecretAction().GetSecrets()
ids := make([]string, 0, len(inputSecrets))
storeUpdateError = cli.Store.MsgSecrets.PutMessageSecrets(ctx, exslices.CastFunc(inputSecrets, func(secret *waSyncAction.WASARootSecretAction_RootSecretEntry) store.MessageSecretInsert {
ids = append(ids, secret.GetID())
return store.MessageSecretInsert{
Chat: botJID,
Sender: ownLID,
ID: secret.GetID(),
Secret: secret.GetRootSecret(),
}
}))
if storeUpdateError == nil && cli.Store.ChatSettings != nil {
var active *waSyncAction.WASARootSecretAction_RootSecretEntry
for _, secret := range inputSecrets {
if secret.GetStatus() == waSyncAction.WASARootSecretAction_RootSecretEntry_ACTIVE && (active == nil || secret.GetEpoch() > active.GetEpoch()) {
active = secret
}
}
storeUpdateError = cli.Store.ChatSettings.PutWASARootSecretID(ctx, botJID, types.MessageID(active.GetID()))
}
if storeUpdateError == nil {
zerolog.Ctx(ctx).Debug().
Strs("ids", ids).
Stringer("bot_jid", botJID).
Msg("Stored WASA root secrets from app state")
}
}
if storeUpdateError != nil {
cli.Log.Errorf("Failed to update device store after app state mutation: %v", storeUpdateError)
Expand Down
5 changes: 5 additions & 0 deletions appstate/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ const (
IndexSettingAutoOrganizeBusinessChat = "setting_autoOrganizeBusinessChat"
IndexCoexV2Version = "coexV2Version"
IndexLockMessage = "lock_message"
IndexContactManagerMetadata = "contact_manager_metadata"
IndexBusinessFolderActivation = "business_folder_activation"
IndexGroupHistoryToggle = "group_history_toggle"
IndexBBProPendingCustomerBaseAction = "bb_pro_pending_customer_base_action"
)

// Constants for the regular app state indexes.
Expand Down Expand Up @@ -128,6 +132,7 @@ const (
IndexNCTSaltSync = "nct_salt_sync"
IndexBizAISettingsNudgeAction = "biz_ai_settings_nudge"
IndexWasaRootSecretAction = "wasa_root_secret"
IndexSharedDeviceAllowlist = "shared_device_allowlist"
)

// Constants for the critical_unblock_low app state indexes.
Expand Down
2 changes: 1 addition & 1 deletion benchmark/barback/cmd/bench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ func (r *runner) validatePhoneNumberConsent(ctx context.Context, client *whatsme
}
select {
case <-smokeCtx.Done():
return fmt.Errorf("Barback did not capture request and share phone number messages: %w", smokeCtx.Err())
return fmt.Errorf("barback did not capture request and share phone number messages: %w", smokeCtx.Err())
case <-ticker.C:
}
}
Expand Down
1 change: 1 addition & 0 deletions benchmark/barback/cmd/bench/phone_consent_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ package main
import whatsmeow "github.com/polymorfa/hypermeow"

func enablePhoneConsentReceiveBarrier(client *whatsmeow.Client) {
//lint:ignore SA1019 The benchmark requires a synchronous receive barrier to measure phone-consent persistence.
client.DangerousInternals().SetSynchronousMessageNameUpdates(true)
}
18 changes: 9 additions & 9 deletions benchmark/barback/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

module github.com/polymorfa/hypermeow/benchmark/barback

go 1.25.0
go 1.26.0

toolchain go1.26.5

Expand All @@ -23,16 +23,16 @@ require (
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/petermattis/goid v0.0.0-20260816044145-ed329add6b1b // indirect
github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261 // indirect
github.com/polymorfa/libsignal-protocol-go v0.2.3-0.20260806162910-a2adef2e8a11 // indirect
github.com/rs/zerolog v1.35.1 // indirect
go.mau.fi/util v0.10.0 // indirect
golang.org/x/crypto v0.55.0 // indirect
golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297 // indirect
golang.org/x/net v0.58.0 // indirect
golang.org/x/sync v0.22.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/text v0.41.0 // indirect
go.mau.fi/util v0.10.1 // indirect
golang.org/x/crypto v0.57.0 // indirect
golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba // indirect
golang.org/x/net v0.59.0 // indirect
golang.org/x/sync v0.23.0 // indirect
golang.org/x/sys v0.48.0 // indirect
golang.org/x/text v0.42.0 // indirect
)

replace github.com/polymorfa/hypermeow => ../..
43 changes: 20 additions & 23 deletions benchmark/barback/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ
github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA=
github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
Expand All @@ -23,11 +21,10 @@ github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHP
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.49 h1:B8jBHC3xhxZgxztrgruTuLucebnULQnx4W7cF7SAE9w=
github.com/mattn/go-sqlite3 v1.14.49/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w=
github.com/petermattis/goid v0.0.0-20260816044145-ed329add6b1b h1:sS7HLzwS+dO+gxATgQfeZDEdUZe2pKAB3nGoUwP5zU0=
github.com/petermattis/goid v0.0.0-20260816044145-ed329add6b1b/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/mattn/go-sqlite3 v1.14.52 h1:wVbm2Qnf4OXkqhBTSPuCRZDRnxfbVrrmiCEroVdog8U=
github.com/mattn/go-sqlite3 v1.14.52/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w=
github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261 h1:lcWAnrqr2nNfDiArwFNHCE4787Mw2tCdVSOXCru0/0E=
github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/polymorfa/libsignal-protocol-go v0.2.3-0.20260806162910-a2adef2e8a11 h1:ZeZ6sUkmZY+v6ULce+O7cuuzUmvu9d3t5sY2CTrJ2AQ=
github.com/polymorfa/libsignal-protocol-go v0.2.3-0.20260806162910-a2adef2e8a11/go.mod h1:B5KZPsgswdf1eCvC+PZ7z45g5OECgqy6Zb0o7I5CcNQ=
Expand All @@ -36,23 +33,23 @@ github.com/rs/zerolog v1.35.1/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
go.mau.fi/util v0.10.0 h1:vH9IXZmfBKa96p47HxrVqEPkrj02zDJg3o4EF172+Lk=
go.mau.fi/util v0.10.0/go.mod h1:uZwpm9sK4wO2Qqy+t6QoVq29szMsRxWXp9/BkQLG4xk=
golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M=
golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis=
golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297 h1:YXnL44eJ77R+ji4/ooy8UsXIhz+lbi2Qgdlc8iRN0gY=
golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297/go.mod h1:Mkmymgv+uMpSQ/XxJ/7GpdrdYoqm3u72jEbpCLiJmNk=
golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To=
golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU=
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
github.com/stretchr/testify v1.12.0 h1:K6Mr6jO9JICuend/5xzTM03ydSV3vdNRYAdPSukj8uI=
github.com/stretchr/testify v1.12.0/go.mod h1:bOYBZb5qJ00vPzWfIqBUZPaxK8jWiXc6d3ErP4Ca9Gw=
go.mau.fi/util v0.10.1 h1:1oSqb4TwzLA0cUDY0aomyBPFKkZ3J5fqCmrXV3VH3GQ=
go.mau.fi/util v0.10.1/go.mod h1:40TDo7/ekSeOjgr8KAmX31Yf4zrOF94j83WQB+u5ZPc=
golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M=
golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA=
golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba h1:Ck8QetSgk912qxWLMCKxd0in+aiyBQyDSMae6e/xmpU=
golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba/go.mod h1:50RgIsmK7OwqzTTeqcSXQW8SswW0o8fRcDxmqGluJ8E=
golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues=
golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg=
golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk=
golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8=
golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M=
golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo=
golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI=
golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E=
google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc=
google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
6 changes: 1 addition & 5 deletions business_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1379,8 +1379,7 @@ func TestHandleBusinessNonceNotificationIsLazyAndNonBlocking(t *testing.T) {
}

func TestBusinessNonceDeliveredBeforeHandlerQueue(t *testing.T) {
client := &Client{handlerQueue: make(chan *waBinary.Node, 1)}
client.handlerQueue <- &waBinary.Node{Tag: "message"}
client := &Client{}
state := client.getBusinessCatalogAuth()
waiter := &businessNonceWaiter{ch: make(chan string, 1)}
state.nonceWaiter.Store(waiter)
Expand All @@ -1395,9 +1394,6 @@ func TestBusinessNonceDeliveredBeforeHandlerQueue(t *testing.T) {
default:
t.Fatal("nonce was blocked behind the handler queue")
}
if len(client.handlerQueue) != 1 {
t.Fatalf("out-of-band delivery changed handler queue length to %d", len(client.handlerQueue))
}
}

func TestBusinessNonceIsNotRedeliveredFromHandlerQueue(t *testing.T) {
Expand Down
Loading
Loading