Skip to content

Hot fix #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions js/modules/qbChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,22 +328,22 @@ ChatProxy.prototype = {

switch (status) {
case Strophe.Status.ERROR:
err = getError(422, 'Status.ERROR - An error has occurred');
err = Utils.getError(422, 'Status.ERROR - An error has occurred');
if (typeof callback === 'function') callback(err, null);
break;
case Strophe.Status.CONNECTING:
Utils.QBLog('[ChatProxy]', 'Status.CONNECTING');
Utils.QBLog('[ChatProxy]', 'Chat Protocol - ' + (config.chatProtocol.active === 1 ? 'BOSH' : 'WebSocket'));
break;
case Strophe.Status.CONNFAIL:
err = getError(422, 'Status.CONNFAIL - The connection attempt failed');
err = Utils.getError(422, 'Status.CONNFAIL - The connection attempt failed');
if (typeof callback === 'function') callback(err, null);
break;
case Strophe.Status.AUTHENTICATING:
Utils.QBLog('[ChatProxy]', 'Status.AUTHENTICATING');
break;
case Strophe.Status.AUTHFAIL:
err = getError(401, 'Status.AUTHFAIL - The authentication attempt failed');
err = Utils.getError(401, 'Status.AUTHFAIL - The authentication attempt failed');
if (typeof callback === 'function') callback(err, null);
break;
case Strophe.Status.CONNECTED:
Expand Down Expand Up @@ -1001,7 +1001,7 @@ PrivacyListProxy.prototype = {
var errorObject = getErrorFromXMLNode(stanzaError);
callback(errorObject, null);
}else{
callback(getError(408), null);
callback(Utils.getError(408), null);
}
});
},
Expand Down Expand Up @@ -1041,7 +1041,7 @@ PrivacyListProxy.prototype = {
var errorObject = getErrorFromXMLNode(stanzaError);
callback(errorObject, null);
}else{
callback(getError(408), null);
callback(Utils.getError(408), null);
}
});
},
Expand Down Expand Up @@ -1105,7 +1105,7 @@ PrivacyListProxy.prototype = {
var errorObject = getErrorFromXMLNode(stanzaError);
callback(errorObject);
}else{
callback(getError(408));
callback(Utils.getError(408));
}
});
},
Expand Down Expand Up @@ -1154,7 +1154,7 @@ PrivacyListProxy.prototype = {
var errorObject = getErrorFromXMLNode(stanzaError);
callback(errorObject);
}else{
callback(getError(408));
callback(Utils.getError(408));
}
});
},
Expand All @@ -1177,7 +1177,7 @@ PrivacyListProxy.prototype = {
var errorObject = getErrorFromXMLNode(stanzaError);
callback(errorObject);
}else{
callback(getError(408));
callback(Utils.getError(408));
}
});
},
Expand All @@ -1200,7 +1200,7 @@ PrivacyListProxy.prototype = {
var errorObject = getErrorFromXMLNode(stanzaError);
callback(errorObject);
}else{
callback(getError(408));
callback(Utils.getError(408));
}
});
}
Expand Down Expand Up @@ -1407,7 +1407,7 @@ function getErrorFromXMLNode(stanzaError) {
var errorElement = stanzaError.getElementsByTagName('error')[0];
var errorCode = parseInt(errorElement.getAttribute('code'));
var errorText = errorElement.getElementsByTagName('text')[0].textContent;
return getError(errorCode, errorText);
return Utils.getError(errorCode, errorText);
}

function getLocalTime() {
Expand Down
Loading