Made sendMessage event capable of handling both individual and public communications.