Skip to content

chore(deps): upgrade whatsmeow and adapt to DownloadMediaWithPathToFile signature change - #23

Merged
vicentereig merged 1 commit into
vicentereig:mainfrom
mikrub:chore/whatsmeow-upgrade
Jul 27, 2026
Merged

vicentereig merged 1 commit into
vicentereig:mainfrom
mikrub:chore/whatsmeow-upgrade

Conversation

@mikrub

@mikrub mikrub commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

whatsmeow on main is ~4 months behind. Bumping it pulls the usual transitive updates and breaks exactly one call site: DownloadMediaWithPathToFile dropped its fileLength int parameter and added allowNoHash bool before file.

We pass allowNoHash=false, which preserves hash verification — and is fail-closed: with it set, whatsmeow substitutes a zero hash when fileSHA256 is nil, so a payload supplying mediaKey+directPath+fileEncSHA256 but omitting fileSHA256 fails verification rather than silently skipping it.

The dropped fileLength was only used in a ReturnDownloadWarnings-gated size comparison after download, never as a streaming bound, so there is no integrity regression — content is still covered by the HMAC and SHA-256 over decrypted bytes.

go build ./..., go test ./... and go test -race ./... all pass.

…le signature change

whatsmeow 2026-03-27 -> 2026-07-20 (plus transitive upgrades).
DownloadMediaWithPathToFile dropped its fileLength parameter and gained
an allowNoHash bool before the file argument; internal/client adapts to
the new signature.
@vicentereig
vicentereig merged commit 1c68381 into vicentereig:main Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants