title: How to auto open a chat in XMPP chat client Converse.js
body: <p>I want to integrate XMPP chat into my website. Tried to create just a bare bone chat, where it should auto login and auto open a chat window. It just can auto login, but does nothing after that.</p>
  
  <p>The whole code is as below. Why it does not auto open a chat window?</p>
  
  <p>
      
          
          
      </p>
  
  <pre><code>&lt;body&gt;
  
  
  &lt;script&gt;
      converse.initialize({
          show_controlbox_by_default: true,
          allow_muc: false,
          show_controlbox_by_default: true,
          auto_login: true,
          authentication: 'login',
          jid: 'kelvin@xmpp.mydomainhere.com',
          password: 'kelvin',
          websocket_url: 'wss://xmpp.mydomainhere.com:5280/websocket'
      });
  
      console.log("000");
  
      converse.plugins.add('myplugin', {
          initialize: function () {
              this._converse.chats.open('jacky@xmpp.mydomainhere.com')
  
              var msg = converse.env.$msg({
                  from: 'kelvin@xmpp.mydomainhere.com',
                  to:'jacky@xmpp.mydomainhere.com',
                  type:'chat'
              });
              this._converse.send(msg);
          }
      });
  
      &lt;/script&gt;
  
      &lt;/body&gt;
  </code></pre>
  
  <p></p>