quickblox 2.17.5-logger → 2.17.7-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 +50 -36
- package/quickblox.min.js +1 -1
- package/src/libs/strophe/strophe.common.js +14 -14
- package/src/libs/strophe/strophe.esm.js +14 -14
- package/src/libs/strophe/strophe.umd.js +17 -17
- package/src/libs/strophe/strophe.umd.min.js +1 -1
- package/src/modules/chat/qbChat.js +16 -16
- package/src/qbConfig.js +1 -1
- package/src/qbStrophe.js +16 -2
|
@@ -418,12 +418,12 @@ function ChatProxy(service) {
|
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
// MUC presences go here
|
|
421
|
-
if (xXMLNS && xXMLNS ==
|
|
421
|
+
if (xXMLNS && xXMLNS == 'http://jabber.org/protocol/muc#user') {
|
|
422
422
|
dialogId = self.helpers.getDialogIdFromNode(from);
|
|
423
423
|
userId = self.helpers.getUserIdFromRoomJid(from);
|
|
424
424
|
|
|
425
425
|
// KICK from dialog event
|
|
426
|
-
if (status && statusCode ==
|
|
426
|
+
if (status && statusCode == '301') {
|
|
427
427
|
if (typeof self.onKickOccupant === 'function') {
|
|
428
428
|
var actorElement = chatUtils.getElement(chatUtils.getElement(x, 'item'), 'actor');
|
|
429
429
|
var initiatorUserJid = chatUtils.getAttr(actorElement, 'jid');
|
|
@@ -879,7 +879,7 @@ ChatProxy.prototype = {
|
|
|
879
879
|
self.isConnected = false;
|
|
880
880
|
self._isConnecting = false;
|
|
881
881
|
self._chatPingFailedCounter = 0;
|
|
882
|
-
self._establishConnection(params);
|
|
882
|
+
self._establishConnection(params,'CONNECTED have SDK ping failed');
|
|
883
883
|
}
|
|
884
884
|
} else {
|
|
885
885
|
Utils.QBLog('[QBChat]',
|
|
@@ -951,7 +951,7 @@ ChatProxy.prototype = {
|
|
|
951
951
|
self.connection.reset();
|
|
952
952
|
|
|
953
953
|
// reconnect to chat and enable check connection
|
|
954
|
-
self._establishConnection(params);
|
|
954
|
+
self._establishConnection(params,'DISCONNECTED');
|
|
955
955
|
|
|
956
956
|
break;
|
|
957
957
|
case Strophe.Status.ATTACHED:
|
|
@@ -1080,7 +1080,7 @@ ChatProxy.prototype = {
|
|
|
1080
1080
|
self._isConnecting = false;
|
|
1081
1081
|
|
|
1082
1082
|
// reconnect to chat and enable check connection
|
|
1083
|
-
self._establishConnection(params);
|
|
1083
|
+
self._establishConnection(params,'NODE:DISCONNECTED');
|
|
1084
1084
|
});
|
|
1085
1085
|
|
|
1086
1086
|
self.Client.on('error', function () {
|
|
@@ -1162,39 +1162,39 @@ ChatProxy.prototype = {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
},
|
|
1164
1164
|
|
|
1165
|
-
_establishConnection: function (params) {
|
|
1165
|
+
_establishConnection: function (params, description) {
|
|
1166
1166
|
var self = this;
|
|
1167
|
-
Utils.QBLog('[QBChat]', '_establishConnection called');
|
|
1167
|
+
Utils.QBLog('[QBChat]', '_establishConnection called in ' + description);
|
|
1168
1168
|
if (typeof self.onLogListener === 'function') {
|
|
1169
1169
|
Utils.safeCallbackCall(self.onLogListener,
|
|
1170
|
-
'[QBChat]' + '_establishConnection called');
|
|
1170
|
+
'[QBChat]' + '_establishConnection called in ' + description);
|
|
1171
1171
|
}
|
|
1172
1172
|
if (self._isLogout || self._checkConnectionTimer) {
|
|
1173
1173
|
Utils.QBLog('[QBChat]', '_establishConnection return');
|
|
1174
1174
|
if (typeof self.onLogListener === 'function') {
|
|
1175
1175
|
Utils.safeCallbackCall(self.onLogListener,
|
|
1176
|
-
'[QBChat]' + ' _establishConnection
|
|
1177
|
-
self._isLogout+' and self._checkConnectionTimer ' +self._checkConnectionTimer?
|
|
1176
|
+
'[QBChat]' + 'BREAK _establishConnection RETURN with self._isLogout: '+
|
|
1177
|
+
self._isLogout?self._isLogout:'undefined'+' and self._checkConnectionTimer ' +self._checkConnectionTimer?self._checkConnectionTimer:'undefined');
|
|
1178
1178
|
}
|
|
1179
1179
|
return;
|
|
1180
1180
|
}
|
|
1181
1181
|
|
|
1182
1182
|
var _connect = function () {
|
|
1183
|
-
Utils.QBLog('[QBChat]', 'call _connect() in _establishConnection ');
|
|
1183
|
+
Utils.QBLog('[QBChat]', 'call _connect() in _establishConnection in '+description);
|
|
1184
1184
|
if (typeof self.onLogListener === 'function') {
|
|
1185
1185
|
Utils.safeCallbackCall(self.onLogListener,
|
|
1186
|
-
'[QBChat]' + ' call _connect() in _establishConnection ');
|
|
1186
|
+
'[QBChat]' + ' call _connect() in _establishConnection in '+description);
|
|
1187
1187
|
}
|
|
1188
1188
|
if (!self.isConnected && !self._isConnecting && !self._sessionHasExpired) {
|
|
1189
|
-
Utils.QBLog('[QBChat]', ' start
|
|
1189
|
+
Utils.QBLog('[QBChat]', ' start EXECUTE connect() in _establishConnection ');
|
|
1190
1190
|
if (typeof self.onLogListener === 'function') {
|
|
1191
1191
|
Utils.safeCallbackCall(self.onLogListener,
|
|
1192
|
-
'[QBChat]' + '
|
|
1192
|
+
'[QBChat]' + ' start EXECUTE connect() in _establishConnection in '+description+' self.isConnected: '+self.isConnected+' self._isConnecting: '+self._isConnecting+' self._sessionHasExpired: '+self._sessionHasExpired);
|
|
1193
1193
|
}
|
|
1194
1194
|
self.connect(params);
|
|
1195
1195
|
if (typeof self.onLogListener === 'function') {
|
|
1196
1196
|
Utils.safeCallbackCall(self.onLogListener,
|
|
1197
|
-
'[QBChat]' + 'call _connect() in _establishConnection is executed');
|
|
1197
|
+
'[QBChat]' + 'call _connect() in _establishConnection in '+description+' is executed');
|
|
1198
1198
|
}
|
|
1199
1199
|
} else {
|
|
1200
1200
|
Utils.QBLog('[QBChat]', 'stop timer in _establishConnection ');
|
|
@@ -1202,7 +1202,7 @@ ChatProxy.prototype = {
|
|
|
1202
1202
|
self._checkConnectionTimer = undefined;
|
|
1203
1203
|
if (typeof self.onLogListener === 'function') {
|
|
1204
1204
|
Utils.safeCallbackCall(self.onLogListener,
|
|
1205
|
-
'[QBChat]' + 'stop timer in _establishConnection ');
|
|
1205
|
+
'[QBChat]' + 'stop timer in _establishConnection in '+description);
|
|
1206
1206
|
}
|
|
1207
1207
|
}
|
|
1208
1208
|
};
|
package/src/qbConfig.js
CHANGED
package/src/qbStrophe.js
CHANGED
|
@@ -23,6 +23,10 @@ function Connection(onLogListener) {
|
|
|
23
23
|
if (data.childNodes[0]) {
|
|
24
24
|
for (var i = 0, len = data.childNodes.length; i < len; i++) {
|
|
25
25
|
Utils.QBLog('[QBChat]', 'RECV:', data.childNodes[i]);
|
|
26
|
+
if (onLogListener && typeof onLogListener === 'function') {
|
|
27
|
+
Utils.safeCallbackCall(onLogListener,
|
|
28
|
+
'[QBChat][QBStrophe]' + 'RECV:' + data.childNodes[i]);
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
32
|
};
|
|
@@ -30,13 +34,20 @@ function Connection(onLogListener) {
|
|
|
30
34
|
if (data.childNodes[0]) {
|
|
31
35
|
for (var i = 0, len = data.childNodes.length; i < len; i++) {
|
|
32
36
|
Utils.QBLog('[QBChat]', 'SENT:', data.childNodes[i]);
|
|
37
|
+
if (onLogListener && typeof onLogListener === 'function') {
|
|
38
|
+
Utils.safeCallbackCall(onLogListener,
|
|
39
|
+
'[QBChat][QBStrophe]' + 'SENT:' + data.childNodes[i]);
|
|
40
|
+
}
|
|
33
41
|
}
|
|
34
42
|
}
|
|
35
43
|
};
|
|
36
44
|
} else {
|
|
37
45
|
conn.xmlInput = function(data) {
|
|
38
46
|
Utils.QBLog('[QBChat]', 'RECV:', data);
|
|
39
|
-
|
|
47
|
+
if (onLogListener && typeof onLogListener === 'function') {
|
|
48
|
+
Utils.safeCallbackCall(onLogListener,
|
|
49
|
+
'[QBChat][QBStrophe]' + 'RECV:' + data);
|
|
50
|
+
}
|
|
40
51
|
try {
|
|
41
52
|
let parser = new DOMParser();
|
|
42
53
|
let xmlDoc = parser.parseFromString(data, 'text/xml');
|
|
@@ -56,10 +67,13 @@ function Connection(onLogListener) {
|
|
|
56
67
|
} catch (e) {
|
|
57
68
|
console.error('Error parsing XML input:', e);
|
|
58
69
|
}
|
|
59
|
-
//
|
|
60
70
|
};
|
|
61
71
|
conn.xmlOutput = function(data) {
|
|
62
72
|
Utils.QBLog('[QBChat]', 'SENT:', data);
|
|
73
|
+
if (onLogListener && typeof onLogListener === 'function') {
|
|
74
|
+
Utils.safeCallbackCall(onLogListener,
|
|
75
|
+
'[QBChat][QBStrophe]' + 'SENT:' + data);
|
|
76
|
+
}
|
|
63
77
|
};
|
|
64
78
|
}
|
|
65
79
|
|