Open KKshitiz opened 4 months ago
Sure, thanks a lot. Here's the related PR: https://github.com/pedroslopez/whatsapp-web.js/pull/600
Since it's supported by the Whatsapp web library itself, it shouldn't be a security concern. Let me know what do you think.
Also, I'd be more than happy to work on this if you can guide me a bit.
It's possible to do it this way tho
extra: {
quotedMsg: {
my_custom_key: 'some-value',
},
},
in that case we get back it in _data
"quotedMsg": {
"my_custom_key": "some-value"
},
But I'm not sure about "blocking" concerns - changing payload can be detected by end clients pretty easily
I wouldn't suggest to use that feature and stick to original one only, but if you 100% wish to do that - we can do that!
With that you'll be able to also add self: "in"
in that payload to detect messages from the app (not from other sources) https://github.com/devlikeapro/whatsapp-http-api/issues/304
I'd strongly recommend using extral database for that tho, but it's up to you, we can add it on our side, not a problem!
I want to add some custom keys while sending the messages in order to integrate it with some other system. Once the message is created with this custom key, it should reflect in the webhook payload as well.
The sendText function should look like this:
I checked the
MessageSendOptions
type in the WAWebJS library and it seems to have anextra
param, but it doesn't work: