Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Messages with IDs starting with 66 and 67
This fix addresses an issue in the encodeBinaryNode function where messages with IDs starting with "66" or "67" were being encoded incorrectly. The root cause was an improper order of checks in the writeString function, causing valid strings to be misinterpreted as hexadecimal values. This led to malformed nodes being generated and sent repeatedly, blocking message flows. Changes: Reordered checks in the writeString function to ensure: Tokens are prioritized using TOKEN_MAP. Nibble-encoded strings are processed correctly. Valid strings default to JID decoding or raw encoding before hex checks. Updated logic ensures accurate handling of IDs resembling hexadecimal strings but requiring string encoding. Impact: Resolves infinite ACK resend loops caused by malformed nodes. Improves reliability in processing message acknowledgments. Enhances network efficiency by eliminating unnecessary retries.
- Loading branch information