Comments (3)
Description
Replying to a message only works in one way for me, using the deprecated
client.reply()
API. The messages appear as regular messages but are not flagged as replies. For the new way to reply, the API docs say I should use the ID parameter, but there is alsot
and both seem to work. What is the difference between them?There is a possibility that I just do not understand how I'm supposed to implement it without using the deprecated method.
Environment
- WPPConnect version(s): 1.30.3
- WA-JS version(s): 3.3.0
- Browser: chrome-launcher@^0.15.2 / [email protected]
- OS: Windows 11
- Node version: Node v18.17.1
- WhatsApp version: 2.2411.x
- MultiDevice (BETA): no?
Steps to Reproduce
- Receive a simple text
- Send a text reply to it
Log Output
None, it does not throw an error, just does not work as expected. The messages are just sent as regular messages.
Your Code
client.reply(message.chatId, "my reply", message.id) // works client.reply(message.chatId, "my reply", message.t) // works //does not work return client.sendText(message.from, "my reply", { quotedMsgObj: message, }); //does not work return client.sendText(message.from, "my reply", { quotedMsgId: message.t }); //does not work return client.sendText(message.from, "my reply", { quotedMsgId: message.id });
Hi, use:
// A message with reply
client.sendText('<number>@c.us', 'A simple message', {
quotedMsg: '[email protected]_3EB01DE65ACC6_out'
});
from wppconnect.
So I need to supply the right value to quotedMsg
? I thought I had done that; I took the ID property of the incoming message. Is this the wrong field? The one I used is id
which has a string value like 'false_[redacted phone number]@c.us_C1F[...]58'
.
Once I understand how the non-deprecated approach works I can volunteer to amend an example into the documentation or add more JSDoc info.
from wppconnect.
So I need to supply the right value to
quotedMsg
? I thought I had done that; I took the ID property of the incoming message. Is this the wrong field? The one I used isid
which has a string value like'false_[redacted phone number]@c.us_C1F[...]58'
. Once I understand how the non-deprecated approach works I can volunteer to amend an example into the documentation or add more JSDoc info.
Yes, exactly that way, you need to pass the id parameter. Regarding the documentation, I have already made a PR, but I am here analyzing other issues and fixing them to go along.
from wppconnect.
Related Issues (20)
- TimeoutError: waiting for target failed: timeout 30000ms exceed HOT 1
- The function addOrRemoveLabels of Whatsapp is no working HOT 2
- Preciso da ajuda para publicar o meu projeto. HOT 3
- Documentation error in "Creating a Client" page
- Fail to Login via QR code HOT 2
- Getting error After install wppconnect in window System HOT 3
- WPP.chat.getMessages Issue HOT 3
- sanitization error if no session name is specified HOT 1
- difference between `content` and `body` of a message
- `wapi.js injected` several times HOT 9
- Number doesn't exists HOT 5
- Best way to restart after browser closing?
- Cannot apply for group membership HOT 2
- Constant for the maximum message length
- o.StatusStore.find is not a function
- [Bug] - SendAudio and SendImageAsSticker doesnt work
- Default device name
- Does startTyping with a given time actually wait?
- Pre-evaluated boolean on message object for related mentions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wppconnect.