Skip to content

deleteMessage with everyOne=false does not delete the message only for the sender #217

@kevin0168

Description

@kevin0168

Pesquisei problemas semelhantes no GitHub e não encontrei nenhum.

  • Sim

Quais passos para chegar ao problema?

Describe the bug

The /chat/deleteMessage/{instanceName} endpoint does not behave correctly when everyOne=false.

According to the Swagger description, everyOne means:

Specifies whether the message should be deleted for everyone in the chat.

So when everyOne=false, the expected behavior is:

  • the message is deleted only from the current logged-in WhatsApp account
  • the recipient should still be able to see the message

But in practice, sender-side delete-for-me is not working correctly.

In our tests, one of these wrong behaviors happens:

  • sometimes the API returns success / acknowledged, but the sender-side message is still not actually deleted in WhatsApp
  • sometimes an attempted local-only delete ends up affecting both sides instead of only the sender side

This makes everyOne=false unreliable for production use.

Descreva o que você esperava que acontecesse.

To Reproduce

  1. Start whatsapp-api
  2. Log in an instance with a real WhatsApp account
  3. Send a message from this account to another account
  4. Call:
DELETE /chat/deleteMessage/{instanceName}

With payload / query equivalent to:

{
  "instanceName": "codechat-xx_huang",
  "messageRecordId": "e289bb87-xxfc-4efd-9a43-63eb3de883e1",
  "everyOne": false
}
  1. Check both WhatsApp clients after the request succeeds

Explique o que realmente acontece quando você segue os passos acima.

Expected behavior

When everyOne=false:

  • the message should disappear only from the current logged-in sender account
  • the recipient should still see the original message

When everyOne=true:

  • the message should be revoked for everyone, subject to WhatsApp limitations

Actual behavior

When everyOne=false, the result is incorrect / inconsistent:

  • sender-side delete-for-me does not reliably happen
  • in some test cases, both sides no longer see the message, which matches revoke behavior rather than local-only delete behavior

API documentation reference

Current Swagger description for everyOne:

Specifies whether the message should be deleted for everyone in the chat.

This strongly implies that false should mean delete only for the current account, not revoke for everyone.

Insira o número da sua versão que está na propriedade version do package.json.

Additional context

  • whatsapp-api version: 1.3.7
  • Baileys dependency: @whiskeysockets/baileys@^7.0.0-rc13
  • node version:v22.22.2

We also checked /chat/deleteChat/{instanceName}, but that endpoint is for deleting the whole chat locally, not for deleting a single message, so it is not a workaround for this bug.

From the integration side, this issue is especially confusing because the API may return a successful result or local acknowledgment, but the real WhatsApp client behavior does not match a true sender-only deletion.

It would be helpful to clarify:

  • whether everyOne=false is officially supported for single-message local deletion
  • whether the current Baileys-based implementation can reliably support delete-for-me
  • whether this route should document current limitations if the feature is not fully supported

Se possível, adicione capturas de tela ou vídeos que ilustrem o problema.

Isso pode ser extremamente útil para entender melhor o problema.

O ambiente no qual a aplicação está em execução

Windows

Por favor, anexe os logs que possam estar relacionados ao problema.

Se os logs contiverem informações sensíveis, considere enviá-los de forma privada para um dos mantenedores do projeto.

Inclua aqui qualquer outra informação que você ache que possa ser útil para entender ou resolver o bug.

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is neededpt-brPara solicitações em Português

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