title: Send message programmatically with converse.js?
body: <p>I am using converse.js to provide chat functionality.
  I am looking for a way to send some messages thru the API based on other buttons in the rest of the system.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var chat = converse.chats.open(jid);
  chat.open();
  chat.sendMessage(message);</code></pre>
  </div>
  </div>
  </p>
  
  <p>chat.sendMessage() fails because the chatbox that has been returned only has limited functionality. 
  <a href="https://conversejs.org/docs/html/development.html#the-chats-grouping" rel="nofollow">https://conversejs.org/docs/html/development.html#the-chats-grouping</a></p>
  
  <p>Should I override the wrappedChatBox functionality or is there a cleaner way to send a message?
  <a href="https://github.com/jcbrand/converse.js/blob/0746f2aa682b3a03a5c04a94570352e6921cde86/src/converse-core.js#L273" rel="nofollow">https://github.com/jcbrand/converse.js/blob/0746f2aa682b3a03a5c04a94570352e6921cde86/src/converse-core.js#L273</a></p>