Closed KKshitiz closed 1 month ago
Actually, no. Basically, the webhook events for all the sent messages are triggered, even if they are from the host device or any of the linked devices.
This field used to indicate whether the message was sent from the current device which is logged in (WAHA application in this case) and not from any other device.
I used this for integration with our custom messaging systems.
Any idea why the field was removed or if there's an alternative to this?
Yep, looks like whatsapp itself don't accept that and implementing it on app side is the only way to solve it :(
The extra options https://github.com/devlikeapro/whatsapp-http-api/issues/272 (I thought we could add self: out
or another attribute there on out messages from the library to detect them later) doesn't' work - no my_custom_key
gets back in the original payload (likely WhatsApp start to cleanup the payload on WhatsApp Web before encrypting it)
I've left a comment here https://github.com/devlikeapro/whatsapp-http-api/issues/272#issuecomment-2093987668
Would the extra
that you can add like this solve your problem?
"quotedMsg": {
"self": "out"
},
You could check that field and if it's not present - it's likely self: in
, not out
message.
I'm not sure about the solution stability - it can be changed in WhatsApp Web pretty easily, so we'll have to come up with something new :(
The "external database" approach looks more stable, IMO
I haven't tested it with realy "reply" message yet also
be great if we can get the "external database" solution working
I meant YOUR application database :D
So when you're using HTTP API /sendText - you save the message id in the database and then compare it when receiving message.any
event.
Sorry for misunderstanding.
It could be added as a part in MongoDB storage tho :thinking: Do you use it?
Describe the bug
Version
To Reproduce Steps to reproduce the behavior:
payload._data
forself
field in themessage.any
event bodyExpected behavior