We are using Twilio's javascript SDK to create a programmable chat. I am hooking up to the messageAdded event to play an audio alert. But the messageAdded event gets triggered, both for an inbound message (which is what I want), and for an outbound message as well.
The handler accepts an argument, that represents a message
How can I identify the sender from the message? The closest I find is, message.author which has a value of 'system' for inbound.
What is the difference between messageAdded and messageUpdated event?