|
@@ -121,8 +121,8 @@ function connect(jid, password) {
|
121
|
121
|
|
122
|
122
|
var anonymousConnectionFailed = false;
|
123
|
123
|
connection.connect(jid, password, function (status, msg) {
|
|
124
|
+ console.log('Strophe status changed to', Strophe.getStatusString(status));
|
124
|
125
|
if (status === Strophe.Status.CONNECTED) {
|
125
|
|
- console.log('connected');
|
126
|
126
|
if (config.useStunTurn) {
|
127
|
127
|
connection.jingle.getStunAndTurnCredentials();
|
128
|
128
|
}
|
|
@@ -135,7 +135,6 @@ function connect(jid, password) {
|
135
|
135
|
if(msg === 'x-strophe-bad-non-anon-jid') {
|
136
|
136
|
anonymousConnectionFailed = true;
|
137
|
137
|
}
|
138
|
|
- console.log('status', status);
|
139
|
138
|
} else if (status === Strophe.Status.DISCONNECTED) {
|
140
|
139
|
if(anonymousConnectionFailed) {
|
141
|
140
|
// prompt user for username and password
|
|
@@ -145,8 +144,6 @@ function connect(jid, password) {
|
145
|
144
|
// wrong password or username, prompt user
|
146
|
145
|
$(document).trigger('passwordrequired.main');
|
147
|
146
|
|
148
|
|
- } else {
|
149
|
|
- console.log('status', status);
|
150
|
147
|
}
|
151
|
148
|
});
|
152
|
149
|
}
|