sending a message adds it to a local json object