clear chat input before submitting message

issue #837