const manager = Manager.getInstance()
manager.chatClient.on('messageAdded', payload => {
console.log('payload', payload) // it is correct
console.log('payload state attributes', payload.state.attributes)
})
Attributes are correct on chrome's console log
{
"body": "",
"media": null,
"attributes": {
"media": "https://api.twilio.com/2010-04-01/Accounts/ACfba1ba518fcc2321c11142f4041efa23/Messages/MM762e5ab98a2adde2970303db9ab6f4ba/Media/ME77ada464c9d50d6441501abf7bbd45c3",
"mediaType": "image/jpeg"
},
}
But with payload.state.attributes
, the attributes changed to:
{
"proxied": true
[[Prototype]]: Object
}