title: XMPP - Strophe.register.js
body: <p>I am trying to add new user to my XMPP server. I am using strophe.register.js and here is my code</p>
  
  <pre><code>var callback = function (status) {
    if (status === Strophe.Status.REGISTER) {
  
          connection.register.fields.username = "juliet";
          connection.register.fields.password = "R0m30";
  
          connection.register.submit();
        } 
        else if (status === Strophe.Status.REGISTERED) {
          console.log("registered!");
          // calling login will authenticate the registered JID.
          connection.register.authenticate();
        } else if (status === Strophe.Status.CONFLICT) {
          console.log("Contact already existed!");
        } else if (status === Strophe.Status.NOTACCEPTABLE) {
          console.log("Registration form not properly filled out.")
        } else if (status === Strophe.Status.REGIFAIL) {
          console.log("The Server does not support In-Band Registration")
        } else if (status === Strophe.Status.CONNECTED) {
          console.log('logged in')
        } else {
          console.log("every other status a connection.connect would receive");
        }
      };
  
  
      $("#registerBtn").click(function(){
        connection.register.connect("192.168.1.77/bosh/", callback, 60, 1);
  
      })
  </code></pre>
  
  <p>when I click the #registerBtn i expect to have user created with uname: juliet and pass: R0m30.</p>
  
  <p>Instead of that i get this error in console:
  TypeError: that._buildBody is not a function coming from strophe.register.js line 106</p>
  
  <p>I have checked almost every xmpp-strophe connected question here and I could not find solution.</p>
  
  <p>I tried this solution: <a href="https://stackoverflow.com/questions/14550114/register-xmpp-account-using-the-strophe-js-register-pluging">Register XMPP-Account using the Strophe.js-Register-Pluging</a> but it did not work for me.
  Anyone any Idea?</p>