@japofc/baileys - v2.4.7
    Preparing search index...

    Function decryptMessageEdit

    • Decrypt a secretEncryptedMessage carrying a MESSAGE_EDIT payload.

      WhatsApp started wrapping message edits in an E2EE envelope (May 2026). The new content is encrypted with a key derived from the original message's messageContextInfo.messageSecret using HKDF-SHA256

      • AES-256-GCM, same family as polls and event responses but with different constants (validated against live WhatsApp Android traffic):

        info = msgId || origSenderJid || editorJid || "Message Edit" aad = (empty) <-- differs from Poll Vote / Event Response key = HKDF-SHA256(salt=zeros, ikm=messageSecret, info, L=32)

      The decrypted plaintext is a regular any whose protocolMessage.editedMessage field holds the new content — same shape as the legacy protocolMessage.editedMessage edit path, so consumers can treat the result identically.

      Parameters

      • edit: { encIv: any; encPayload: any }

        encrypted edit payload (encPayload + encIv from SecretEncryptedMessage)

      • ctx: { editEncKey: any; editorJid: any; originalMsgId: any; originalSenderJid: any }

        info about the original message required for decryption

      Returns any

      decoded outer Message whose protocolMessage.editedMessage carries the new content (extendedTextMessage / conversation / etc.)