Skip to content

feat(GOWS): forward whatsmeow events.DeleteForMe as a webhook (phone-side "delete for me" sync) #2116

@Sahil-Koshia

Description

@Sahil-Koshia

Problem

On the GOWS engine, a "delete for me" performed on the user's phone is never surfaced to API clients. There is no webhook event and no flag, so a server-side client (or another linked device built on WAHA) has no way to know the message was deleted-for-me and cannot reflect it.

This is the inbound counterpart to #2022 (which proposes a forMe param on the DELETE endpoint, i.e. the outbound direction). #2022 lets an API caller delete-for-me; this request is about receiving a delete-for-me that originated on the phone.

What I observed (WAHA 2026.5.1, GOWS, tier PLUS)

  1. Do "Delete for me" on a message from the WhatsApp phone app.
  2. GET /api/{session}/chats/{chatId}/messages still returns that message with its full body and no deletion indicator (no revoked/deleted flag, _data.Info.Type unchanged).
  3. No webhook fires. Capturing the webhook stream during the action shows only message.ack events — no message.revoked, nothing delete-related.

By contrast, delete for everyone on the phone correctly fires message.revoked (added in 2025.6.3), and clients reflect it. Only delete for me is silent.

Why this looks fixable

The official WhatsApp Web companion reflects a phone-side delete-for-me, because it processes the app-state DeleteMessageForMe mutation. The underlying multi-device library WAHA's GOWS engine uses, whatsmeow, already exposes this as a typed event:

  • events.DeleteForMe — go.mau.fi/whatsmeow/types/events — "emitted when a message is deleted (for the current user only) from another device." Fields: ChatJID, SenderJID, IsFromMe, MessageID, Timestamp, Action (DeleteMessageForMeAction), FromFullSync.

So the signal reaches the GOWS layer; it just isn't forwarded. The GOWS bridge currently maps RevokeMessagemessage.revoked but has no handler for events.DeleteForMe, and the gRPC layer carries only RevokeMessageRequest / DeleteLabelRequest (no DeleteForMe type).

Proposed solution

Forward whatsmeow's events.DeleteForMe on GOWS as a webhook event, mirroring how message.revoked was added in 2025.6.3. For example a message.deleted_for_me event (or a scope: "me" | "everyone" field on the existing delete event), carrying at least:

{
  "event": "message.deleted_for_me",
  "session": "default",
  "payload": {
    "id":   "<message id>",
    "chatId": "<chat jid>",
    "fromMe": true,
    "timestamp": 1781000000
  }
}

This would let API clients keep parity with the WhatsApp Web UI (the message disappears on all the user's surfaces, not just the phone).

Engine scope

Primary ask is GOWS (whatsmeow events.DeleteForMe). NOWEB (Baileys) has an equivalent app-state mutation and would be a natural follow-up; WEBJS is best-effort.

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions