Update message.js

Added addObject method to use javascript object as message payload.