-
-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
message reply method not working as expected #2198
Comments
Hi, use:
|
So I need to supply the right value to |
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. |
Your example worked for me when using the ID property: client.sendText(message.chatId, "my reply", { quotedMsg: message.id }) Obrigado. I also tried client.sendText(message.chatId, "my reply", { quotedMsg: message }) which I thought should have worked according to the accepted types of Error when sending predefined query: Error: Invalid quotedMsg
at [...]\node_modules\@wppconnect-team\wppconnect\dist\api\helpers\evaluate-and-return.js:107:31
at step ([...]\node_modules\@wppconnect-team\wppconnect\dist\api\helpers\evaluate-and-return.js:49:23)
at Object.next ([...]\node_modules\@wppconnect-team\wppconnect\dist\api\helpers\evaluate-and-return.js:30:53)
at fulfilled ([...]\node_modules\@wppconnect-team\wppconnect\dist\api\helpers\evaluate-and-return.js:21:58)
JS Stack: Error: Invalid quotedMsg
at t.prepareRawMessage ([...]\node_modules\@wppconnect\wa-js\dist\wppconnect-wa.js:2:174499)
at async t.sendRawMessage ([...]\node_modules\@wppconnect\wa-js\dist\wppconnect-wa.js:2:187654)
at async t.sendTextMessage ([...]\node_modules\@wppconnect\wa-js\dist\wppconnect-wa.js:2:191842)
at async pptr:evaluate;C%3A%5C[...]%5Cnode_modules%5C%40wppconnect-team%5Cwppconnect%5Cdist%5Capi%5Chelpers%5Cevaluate-and-return.js%3A99%3A56:56:26
Function: function (_a) {
var to = _a.to, content = _a.content, options = _a.options;
return WPP.chat.sendTextMessage(to, content, __assign(__assign({}, options), { waitForAck: true }));
} {
code: 'invalid_quoted_msg',
quotedMsg: {}
} created a PR to adjust the docs: #2265 |
@gekkedev, ⭐3 XP earned, 🏆First Comment Added completed, 💪Level 4 achieved! |
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 also
t
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
Steps to Reproduce
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
The text was updated successfully, but these errors were encountered: