From 215f7c8955618fba9edf1b87dc67b8466bc8ef9c Mon Sep 17 00:00:00 2001 From: joseorlando-nsolucoes <126002858+joseorlando-nsolucoes@users.noreply.github.com> Date: Mon, 7 Aug 2023 09:54:09 -0300 Subject: [PATCH] Added: update message example to readme.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index b2ec00c..7e5c9c6 100644 --- a/README.md +++ b/README.md @@ -645,6 +645,17 @@ await sock.sendMessage(jid, { delete: response.key }) **Note:** deleting for oneself is supported via `chatModify` (next section) +## Updating Messages + +``` ts +const jid = '1234@s.whatsapp.net' + +await sock.sendMessage(jid, { + text: 'updated text goes here', + edit: response.key, + }); +``` + ## Modifying Chats WA uses an encrypted form of communication to send chat/app updates. This has been implemented mostly and you can send the following updates: