quickblox 2.17.3-logger → 2.17.5-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 +36 -25
- package/quickblox.min.js +1 -1
- package/src/libs/strophe/strophe.common.js +14 -3
- package/src/libs/strophe/strophe.esm.js +14 -3
- package/src/libs/strophe/strophe.umd.js +14 -3
- package/src/libs/strophe/strophe.umd.min.js +1 -1
- package/src/modules/chat/qbChat.js +17 -17
- package/src/modules/webrtc/qbWebRTCSignalingProcessor.js +1 -1
- package/src/modules/webrtc/qbWebRTCSignalingProvider.js +1 -1
- package/src/qbConfig.js +1 -1
- package/strophejs-1.4.0/package-lock.json +24 -21
- package/strophejs-1.4.0/package.json +1 -1
- package/strophejs-1.4.0/src/core.js +5 -0
- package/strophejs-1.4.0/src/websocket.js +5 -1
- package/strophejs-1.4.0/src/worker-websocket.js +3 -1
|
@@ -1844,6 +1844,7 @@ Strophe.Connection = class Connection {
|
|
|
1844
1844
|
error.name = 'StropheSessionError';
|
|
1845
1845
|
throw error;
|
|
1846
1846
|
}
|
|
1847
|
+
if (this.clientLogger) this.clientLogger('Strophe call unexpected method restore.');
|
|
1847
1848
|
}
|
|
1848
1849
|
|
|
1849
1850
|
/** PrivateFunction: _sessionCachingSupported
|
|
@@ -2141,6 +2142,7 @@ Strophe.Connection = class Connection {
|
|
|
2141
2142
|
this._data.push("restart");
|
|
2142
2143
|
this._proto._sendRestart();
|
|
2143
2144
|
this._idleTimeout = setTimeout(() => this._onIdle(), 100);
|
|
2145
|
+
if (this.clientLogger) this.clientLogger('Strophe _sendRestart method is called.');
|
|
2144
2146
|
}
|
|
2145
2147
|
|
|
2146
2148
|
/** Function: addTimedHandler
|
|
@@ -2334,8 +2336,10 @@ Strophe.Connection = class Connection {
|
|
|
2334
2336
|
this._changeConnectStatus(Strophe.Status.DISCONNECTING, reason);
|
|
2335
2337
|
if (reason) {
|
|
2336
2338
|
Strophe.warn("Disconnect was called because: " + reason);
|
|
2339
|
+
if (this.clientLogger) this.clientLogger('Disconnect was called because: ' + reason);
|
|
2337
2340
|
} else {
|
|
2338
2341
|
Strophe.info("Disconnect was called");
|
|
2342
|
+
if (this.clientLogger) this.clientLogger('Disconnect was called');
|
|
2339
2343
|
}
|
|
2340
2344
|
if (this.connected) {
|
|
2341
2345
|
let pres = false;
|
|
@@ -2352,6 +2356,7 @@ Strophe.Connection = class Connection {
|
|
|
2352
2356
|
this._proto._disconnect(pres);
|
|
2353
2357
|
} else {
|
|
2354
2358
|
Strophe.warn("Disconnect was called before Strophe connected to the server");
|
|
2359
|
+
if (this.clientLogger) this.clientLogger('Disconnect was called before Strophe connected to the server');
|
|
2355
2360
|
this._proto._abortAllRequests();
|
|
2356
2361
|
this._doDisconnect();
|
|
2357
2362
|
}
|
|
@@ -159,7 +159,7 @@ Strophe.Websocket = class Websocket {
|
|
|
159
159
|
this.socket.onclose = (e) => this._onClose(e);
|
|
160
160
|
// Gets replaced with this._onMessage once _onInitialMessage is called
|
|
161
161
|
this.socket.onmessage = (message) => this._onInitialMessage(message);
|
|
162
|
-
this._conn.clientLogger('_connect method was called with WebSocket protocol');
|
|
162
|
+
if (this._conn.clientLogger) this._conn.clientLogger('_connect method was called with WebSocket protocol');
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
/** PrivateFunction: _connect_cb
|
|
@@ -311,6 +311,7 @@ Strophe.Websocket = class Websocket {
|
|
|
311
311
|
*/
|
|
312
312
|
_doDisconnect () {
|
|
313
313
|
Strophe.debug("WebSockets _doDisconnect was called");
|
|
314
|
+
if (this._conn.clientLogger) this._conn.clientLogger('WebSockets _doDisconnect was called');
|
|
314
315
|
this._closeSocket();
|
|
315
316
|
}
|
|
316
317
|
|
|
@@ -337,6 +338,7 @@ Strophe.Websocket = class Websocket {
|
|
|
337
338
|
this.socket.close();
|
|
338
339
|
} catch (e) {
|
|
339
340
|
Strophe.debug(e.message);
|
|
341
|
+
if (this._conn.clientLogger) this._conn.clientLogger(e.message);
|
|
340
342
|
}
|
|
341
343
|
}
|
|
342
344
|
this.socket = null;
|
|
@@ -365,6 +367,7 @@ Strophe.Websocket = class Websocket {
|
|
|
365
367
|
// dispatch a CONNFAIL status update to be consistent with the
|
|
366
368
|
// behavior on other browsers.
|
|
367
369
|
Strophe.error("Websocket closed unexcectedly");
|
|
370
|
+
if (this._conn.clientLogger) this._conn.clientLogger('Websocket closed unexcectedly');
|
|
368
371
|
this._conn._changeConnectStatus(
|
|
369
372
|
Strophe.Status.CONNFAIL,
|
|
370
373
|
"The WebSocket connection could not be established or was disconnected."
|
|
@@ -412,6 +415,7 @@ Strophe.Websocket = class Websocket {
|
|
|
412
415
|
*/
|
|
413
416
|
_onError (error) {
|
|
414
417
|
Strophe.error("Websocket error " + error);
|
|
418
|
+
if (this._conn.clientLogger) this._conn.clientLogger('Websocket error ' + error);
|
|
415
419
|
this._conn._changeConnectStatus(
|
|
416
420
|
Strophe.Status.CONNFAIL,
|
|
417
421
|
"The WebSocket connection could not be established or was disconnected."
|
|
@@ -51,7 +51,7 @@ Strophe.WorkerWebsocket = class WorkerWebsocket extends Strophe.Websocket {
|
|
|
51
51
|
this.worker.port.start();
|
|
52
52
|
this.worker.port.onmessage = (ev) => this._onWorkerMessage(ev);
|
|
53
53
|
this.worker.port.postMessage(['_connect', this._conn.service, this._conn.jid]);
|
|
54
|
-
this._conn.clientLogger('_connect method was called with WebSocket worker protocol');
|
|
54
|
+
if (this._conn.clientLogger) this._conn.clientLogger('_connect method was called with WebSocket worker protocol');
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
_attach (callback) {
|
|
@@ -90,6 +90,7 @@ Strophe.WorkerWebsocket = class WorkerWebsocket extends Strophe.Websocket {
|
|
|
90
90
|
_onClose (e) {
|
|
91
91
|
if (this._conn.connected && !this._conn.disconnecting) {
|
|
92
92
|
Strophe.error("Websocket closed unexpectedly");
|
|
93
|
+
if (this._conn.clientLogger) this._conn.clientLogger("Websocket closed unexpectedly");
|
|
93
94
|
this._conn._doDisconnect();
|
|
94
95
|
} else if (e && e.code === 1006 && !this._conn.connected) {
|
|
95
96
|
// in case the onError callback was not called (Safari 10 does not
|
|
@@ -97,6 +98,7 @@ Strophe.WorkerWebsocket = class WorkerWebsocket extends Strophe.Websocket {
|
|
|
97
98
|
// dispatch a CONNFAIL status update to be consistent with the
|
|
98
99
|
// behavior on other browsers.
|
|
99
100
|
Strophe.error("Websocket closed unexcectedly");
|
|
101
|
+
if (this._conn.clientLogger) this._conn.clientLogger("Websocket closed unexpectedly");
|
|
100
102
|
this._conn._changeConnectStatus(
|
|
101
103
|
Strophe.Status.CONNFAIL,
|
|
102
104
|
"The WebSocket connection could not be established or was disconnected."
|