Skip to content

Conversation

@jlucaso1
Copy link
Collaborator

Fixes a TypeError: this.isZero is not a function that can occur when serializing a WebMessageInfo object to JSON.

The error happens in a specific edge case where a field defined as a long in the protobuf schema (like fileLength in an ImageMessage) is incidentally assigned a string value instead of a Long object or a number.

@whiskeysockets-bot
Copy link
Contributor

whiskeysockets-bot commented Oct 29, 2025

Thanks for opening this pull request and contributing to the project!

The next step is for the maintainers to review your changes. If everything looks good, it will be approved and merged into the main branch.

In the meantime, anyone in the community is encouraged to test this pull request and provide feedback.

✅ How to confirm it works

If you’ve tested this PR, please comment below with:

Tested and working ✅

This helps us speed up the review and merge process.

📦 To test this PR locally:

# NPM
npm install @whiskeysockets/baileys@WhiskeySockets/Baileys#fix-iszero-serialization

# Yarn (v2+)
yarn add @whiskeysockets/baileys@WhiskeySockets/Baileys#fix-iszero-serialization

# PNPM
pnpm add @whiskeysockets/baileys@WhiskeySockets/Baileys#fix-iszero-serialization

If you encounter any issues or have feedback, feel free to comment as well.

Salientekill pushed a commit to Salientekill/Baileys that referenced this pull request Nov 3, 2025
…ds during JSON serialization

- Add longToString and longToNumber helper functions
- Fix JSON serialization for Long fields in protobuf
- Handle string values properly in Long conversions
- Update WAProto fix-imports.js

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@matheusb-comp matheusb-comp mentioned this pull request Nov 7, 2025
@purpshell
Copy link
Member

resolve conflicts

Salientekill pushed a commit to Salientekill/Baileys that referenced this pull request Nov 19, 2025
…ets#1969 to latest Baileys

Applied PRs:
- WhiskeySockets#2067: libsignal wasm
- WhiskeySockets#2057: emit setting events
- WhiskeySockets#1969: improve retry logic

Note: PRs WhiskeySockets#1991, WhiskeySockets#1981, WhiskeySockets#1906, WhiskeySockets#1892 have conflicts with latest Baileys version and were skipped.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@jlucaso1 jlucaso1 marked this pull request as ready for review November 20, 2025 15:33
@jlucaso1 jlucaso1 requested a review from purpshell November 20, 2025 15:33
Salientekill pushed a commit to Salientekill/Baileys that referenced this pull request Nov 25, 2025
Salientekill pushed a commit to Salientekill/Baileys that referenced this pull request Nov 25, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2025

This PR is stale because it has been open for 14 days with no activity. Remove the stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the Stale label Dec 6, 2025
@vinikjkkj
Copy link
Collaborator

how to reproduce?

@github-actions github-actions bot removed the Stale label Dec 13, 2025
@github-actions
Copy link
Contributor

This PR is stale because it has been open for 14 days with no activity. Remove the stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the Stale label Dec 27, 2025
@purpshell purpshell merged commit 9611a1a into master Jan 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants