quickblox 2.17.2-beta.1-logger → 2.17.2-beta.2-logger
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/quickblox.js +6 -23
- package/quickblox.min.js +1 -1
- package/src/modules/chat/qbChat.js +0 -22
- package/src/qbConfig.js +1 -1
- package/src/qbStrophe.js +5 -0
|
@@ -906,28 +906,6 @@ ChatProxy.prototype = {
|
|
|
906
906
|
break;
|
|
907
907
|
}
|
|
908
908
|
});
|
|
909
|
-
// connection error handler
|
|
910
|
-
self.connection.xmlInput = function (data) {
|
|
911
|
-
try {
|
|
912
|
-
let parser = new DOMParser();
|
|
913
|
-
let xmlDoc = parser.parseFromString(data, 'text/xml');
|
|
914
|
-
|
|
915
|
-
let errorElem = xmlDoc.getElementsByTagName('error');
|
|
916
|
-
if (errorElem.length > 0) {
|
|
917
|
-
let conditionElem = errorElem[0].getElementsByTagName('condition');
|
|
918
|
-
if (conditionElem.length > 0) {
|
|
919
|
-
disconnectCondition = conditionElem[0].textContent;
|
|
920
|
-
console.log('Disconnect condition:', disconnectCondition);
|
|
921
|
-
if (typeof self.onLogListener === 'function') {
|
|
922
|
-
Utils.safeCallbackCall(self.onLogListener,
|
|
923
|
-
'[QBChat]' + ' DISCONNECTED CONDITION: ' + disconnectCondition);
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
} catch (e) {
|
|
928
|
-
console.error('Error parsing XML input:', e);
|
|
929
|
-
}
|
|
930
|
-
};
|
|
931
909
|
}
|
|
932
910
|
|
|
933
911
|
/** connect for node */
|
package/src/qbConfig.js
CHANGED
package/src/qbStrophe.js
CHANGED
|
@@ -35,6 +35,11 @@ function Connection(onLogListener) {
|
|
|
35
35
|
} else {
|
|
36
36
|
conn.xmlInput = function(data) {
|
|
37
37
|
Utils.QBLog('[QBChat]', 'RECV:', data);
|
|
38
|
+
//
|
|
39
|
+
if (onLogListener && typeof onLogListener === 'function') {
|
|
40
|
+
Utils.safeCallbackCall(onLogListener,
|
|
41
|
+
'[QBChat][QBStrophe]' + 'RECV: ' + data);
|
|
42
|
+
}
|
|
38
43
|
//
|
|
39
44
|
try {
|
|
40
45
|
let parser = new DOMParser();
|