chatting submit implementation