-
Notifications
You must be signed in to change notification settings - Fork 0
Fix LID Group Send Failure (not-acceptable error) #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix LID Group Send Failure (not-acceptable error) #14
Conversation
Baileys v6.7.19 includes sender's own devices in senderKeyJids when sending to LID-addressed groups, causing WhatsApp to reject with 'not-acceptable' error. This patch filters sender's own devices from the senderKeyJids list before sending group messages, following the same pattern Baileys uses for non-group messages (meJids vs otherJids filtering). Changes: - Add Baileys patch in patches/baileys+6.7.19+lid-group-send.patch - Update Dockerfile to apply patch after npm ci - Extract meUser from meId and meLid from authState.creds - Skip sender's own devices in senderKeyJids loop Fixes: #issue-number Related: WhiskeySockets/Baileys#1690, EvolutionAPI#1768
…tion Alpine Linux does not include 'patch' by default. Without this, the Baileys LID group send patch would silently fail during build, leaving the fix unapplied in production images. Changes: - Add 'patch' to apk install list - Remove '|| echo' fallback to fail fast on patch errors
…eys-lid-group-senderkey-patch
- Use unified diff format without git headers - Change from -p1 to -p0 for correct path stripping - Ensures patch applies correctly during Docker build
Fixes malformed patch error during Docker build by adding complete trailing context lines to the unified diff format. - Previous patch ended prematurely at line 21 causing "malformed patch at line 19" error - Added proper trailing context (lines showing unchanged code after modifications) - Patch now correctly shows 8→14 line transformation (adding 6 lines of sender filtering) - Updated documentation with deployment issues encountered and solutions Related to LID group send failure fix for "not-acceptable" error.
Fixed indentation mismatch between patch file and actual Baileys source. The patch file must match the exact spacing (20 spaces for line 360-361, 16 spaces for line 362-363) in the original Baileys file. Previous version had incorrect spacing (13-17 spaces) causing patch application to fail with "malformed patch at line 19" error.
💡 Codex ReviewLine 20 in 518f76d
The Docker build now runs ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The patch file had git-style a/ and b/ prefixes which don't work with patch -p0. The patch utility would look for "a/node_modules/..." which doesn't exist, causing "can't find file to patch" error during build. Fixed by removing the prefixes so patch -p0 looks for the correct path: node_modules/baileys/lib/Socket/messages-send.js
|
@codex please review again |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Fixes critical bug preventing group message sends in LID-addressed WhatsApp groups. Baileys v6.7.19 incorrectly includes sender's own devices in sender key distribution list, causing WhatsApp to reject messages with "not-acceptable" error.
Problem
6287777635515(inbox 1) and6287785582370(inbox 16) sending to LID group120363407389509612@g.usRoot Cause
Baileys
messages-send.js(lines 363-372) has no sender filtering for group messages:In contrast, 1:1 message path properly separates
meJidsvsotherJids.Solution
Applied patch to
node_modules/baileys/lib/Socket/messages-send.js:senderKeyJidsarrayPatch file:
patches/baileys+6.7.19+lid-group-send.patchChanges
Dockerfile (line 4, line 11)
patchbinary to Alpine packagesnpm ciCHANGELOG.md
patches/baileys+6.7.19+lid-group-send.patch (new)
docs/troubleshooting/11-12-25-group-chat-not-acceptable-error.md (new)
Deployment Notes
patchbinary in Alpine → Fixed by adding to apk installPatch applies during Docker build after
npm ciinstalls fresh Baileys from npm.Testing Plan
Upstream Status
Related Issues
Verification
After deployment to staging: