whatsapp-cloud-api icon indicating copy to clipboard operation
whatsapp-cloud-api copied to clipboard

Contacts type message payload changing type when context is added

Open guskuma opened this issue 1 year ago • 0 comments

When receiving a forwarded "contacts" type message, Message "data" property that was supposed to be a Contact array, turns into an object filled with Contacts and a "context" property.

Adding context to message.data is causing this issue: https://github.com/tawn33y/whatsapp-cloud-api/blob/32270afa807b398f4d02e91a7018f0c1721f0575/src/startExpressServer.ts#L113

This can be solved by moving "context" property to Message. @tawn33y tell me if this is ok for you and I can do it and open a PR.

Thanks in advance.

guskuma avatar Sep 18 '23 16:09 guskuma