waha icon indicating copy to clipboard operation
waha copied to clipboard

[NOWEB] secretEncryptedMessage with MESSAGE_EDIT not handled — leaks as message.any with null body instead of message.edited

Open VaibhavDhanani opened this issue 6 months ago • 5 comments

Describe the bug

When a message is edited on newer WhatsApp clients, NOWEB receives the edit as a secretEncryptedMessage with secretEncType: "MESSAGE_EDIT". WAHA does not decrypt or handle this format, so it fires as a message.any event with payload.body = null instead of the expected message.edited event with the new text. This is different from the older protocolMessage type 14 edit format (which is handled correctly). This is the secret-encrypted edit protocol used by newer WhatsApp clients.

Version

2026.4.3

{
  "version": "2026.4.3",
  "engine": "NOWEB",
  "tier": "PLUS"
}

Steps

To Reproduce Steps to reproduce the behavior:

  1. Start a NOWEB session and subscribe to message.any and message.edited webhooks
  2. Send a message from a newer WhatsApp client (tested on mobile/WhatsApp app)
  3. Edit that message
  4. Observe: a message.any event fires with payload.body = null and _data.message.secretEncryptedMessage.secretEncType = "MESSAGE_EDIT"
  5. Observe: no message.edited event fires

Expected behavior

  • The secretEncryptedMessage with secretEncType: "MESSAGE_EDIT" should be decrypted using session key material
  • A message.edited event should fire with the new edited text in payload.body
  • It should not appear in message.any (consistent with how other edit formats are handled per the 2025.6 release notes)

Actual behavior

  • A message.any event fires with payload.body = null
  • No message.edited event fires
  • The edited text is inaccessible — it remains encrypted in _data.message.secretEncryptedMessage.encPayload

Requests - Responses

  "secretEncryptedMessage": {
    "targetMessageKey": {
      "remoteJid": "148270894555209@lid",
      "fromMe": true,
      "id": "AC4F4785AA9DDA0C88EA46D684496444"
    },
    "encPayload": "DJWQcvnMzK7...",
    "encIv": "SvOdlqblpd00D+eD",
    "secretEncType": "MESSAGE_EDIT"
  }
}

VaibhavDhanani avatar May 22 '26 10:05 VaibhavDhanani

+1

patron:PLUS

Actualy mine is happening on GOWS

patron:PLUS

+1 , actually i do have plus plan but in my company account so my tag of patron-plus, wont show here. @diego-goncalves-teixeira please tag this issue also in discord as i am unable to do it from company discord account.

Vaibhav1104 avatar May 23 '26 14:05 Vaibhav1104

@devlikepro any updates?

patron:PLUS

@devlikepro any updates?

patron:PLUS

+1

VaibhavDhanani avatar May 25 '26 17:05 VaibhavDhanani