Repository navigation
send: use a fresh sender key for every broadcast list message - #2
Open
ADAMAYAMEOGO wants to merge 1 commit into
Open
ADAMAYAMEOGO wants to merge 1 commit into
ADAMAYAMEOGO wants to merge 1 commit into
Conversation
When another device of the account sends to one of its broadcast lists, the phone only records the message as sent (in the list and in each recipient's chat) if it can't decrypt the fan-out copy: it then asks for a retry and gets the message encrypted for it alone. If it holds the list's sender key, it decrypts the fan-out copy directly and never shows the message. Answering a retry hands it the current sender key (handleRetryReceipt attaches a SenderKeyDistributionMessage for group and broadcast chats), so only the first message after a key change shows up on the phone. Resetting the sender key before each message to a (non-status) broadcast list keeps the phone on the retry path. Recipients are not affected: sendGroup sends the SenderKeyDistributionMessage to every participant device with each message anyway. Statuses and groups are unchanged. Tested with WAHA/GOWS on a personal and a WhatsApp Business account, with consecutive messages to a phone-created list.
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needed to send to phone-created broadcast lists from GOWS (devlikeapro/waha#468).
When a linked device sends to one of the account's broadcast lists, the phone only records the message as sent (in the list and in each recipient's chat) when it can't decrypt the fan-out copy and gets the message through a retry instead. Answering that retry also hands the phone the list's sender key (
handleRetryReceiptattaches a SenderKeyDistributionMessage for group and broadcast chats), so from then on it decrypts the fan-out copy directly and the following messages never show up on the phone. Recipients are not affected.This resets the sender key before each message to a non-status broadcast list. Statuses and groups are unchanged. Recipients get the new key with each message anyway, since
sendGroupsends the SenderKeyDistributionMessage to every participant device every time, and sends are serialized bymessageSendLock.Tested with consecutive messages to a phone-created list, on a personal and a WhatsApp Business account: without the change only the first message after a key change shows up on the phone, with it every message does.
Based on
fork-main-2026-10-13. It replaces #1, which targetedfork-main-2026-09-10. GOWS will need its whatsmeowreplacebumped to include this.