fire message.deleted for WhatsApp app-side deletes (both directions), with the original message id
Currently, when a message is deleted ("delete for everyone") in a WhatsApp conversation, we can't tell which message was deleted:
Business-side delete (from the WA Business app): arrives as a new
message.sentevent withtext: "[revoke]", a freshmessage.id, and a freshplatformMessageId. No reference to the deleted message.Customer-side delete: arrives as a new
message.receivedevent withtext: null,attachments: []— again a freshmessage.id/platformMessageId, no reference to the original.
We are subscribed to message.deleted, but it never fires for either case (confirmed in the webhook logs — only the message.sent / message.received events above appear). The docs say WhatsApp support for message.deleted is limited to deletes issued via the Cloud API, and incoming unsend is Instagram-only.
Ask: emit message.deleted for WhatsApp deletes in both directions (app-side business deletes and customer unsends), carrying the original message's id / platformMessageId — same shape as the Instagram unsend payload. Without a pointer to the original message, inbox UIs can't render a "this message was deleted" state and the [revoke] / null placeholder events are effectively noise.
Example (business-side delete we received — note the ids don't match any prior message):
{
"event": "message.sent",
"message": {
"id": "6a599cbb3d50078defbca0af",
"platformMessageId": "wamid.HBgKNjU4MjgzMjYwOBUCABEYFDJBNTdDMUI3M0ZBM0U4ODAyNEI3AA==",
"direction": "outgoing",
"text": "[revoke]"
}
}
Log in to comment and vote
Comments1
Miquel Palet López
Aug 26
Shipped today, and you were right that we were not reading what Meta sends.
message.deletednow fires for WhatsApp deletions in both directions, a customer unsending and a business deleting from the WhatsApp Business app, and it carries the original message id so you can match it to the message you already stored.The
[revoke]text you were seeing was our own placeholder: we were storing the deletion as if it were an ordinary message instead of recognising it. That is gone.We had previously assessed this as not possible because Meta appeared to send no reference to the original message. That was wrong, and re-checking their documentation is what turned it around. Thanks for the detailed report, it is why this got found.