Move client message logic into sendMessage func