Advertisement
Guest User

Untitled

a guest
Oct 29th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. var callback = function (status) {
  2. if (status === Strophe.Status.REGISTER) {
  3. connection.register.fields.username = "juliet";
  4. connection.register.fields.password = "R0m30";
  5. connection.register.submit();
  6. } else if (status === Strophe.Status.REGISTERED) {
  7. console.log("registered!");
  8. connection.authenticate();
  9. } else if (status === Strophe.Status.CONNECTED) {
  10. console.log("logged in!");
  11. } else {
  12. // every other status a connection.connect would receive
  13. }
  14.  
  15. im.js:5527 Uncaught badformat _reqToData @ im.js:5527 _register_cb @ im.js:173 conn._connect_cb @ im.js:82 _onRequestStateChange @ im.js:5339
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement