quickblox 2.17.17-logger → 2.17.19-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 +9 -9
- package/quickblox.min.js +1 -1
- package/src/modules/chat/qbChat.js +5 -2
- package/src/qbConfig.js +1 -1
- package/src/qbStrophe.js +2 -5
|
@@ -701,8 +701,11 @@ function ChatProxy(service) {
|
|
|
701
701
|
ChatProxy.prototype = {
|
|
702
702
|
|
|
703
703
|
_OnLogListener: function (message) {
|
|
704
|
-
|
|
705
|
-
|
|
704
|
+
var self = this;
|
|
705
|
+
Utils.QBLog('[QBChat][TEST]', self);
|
|
706
|
+
Utils.QBLog('[QBChat][TEST]', typeof self.onLogListener);
|
|
707
|
+
if (typeof self.onLogListener === 'function') {
|
|
708
|
+
Utils.safeCallbackCall(self.onLogListener, message);
|
|
706
709
|
}
|
|
707
710
|
},
|
|
708
711
|
|
package/src/qbConfig.js
CHANGED
package/src/qbStrophe.js
CHANGED
|
@@ -13,16 +13,13 @@ require('./libs/strophe/strophe.umd.js');
|
|
|
13
13
|
var config = require('./qbConfig');
|
|
14
14
|
var chatPRTCL = config.chatProtocol;
|
|
15
15
|
var Utils = require('./qbUtils');
|
|
16
|
-
var QBModules = require('./qbMain');
|
|
17
16
|
|
|
18
17
|
function Connection(onLogListenerCallback) {
|
|
19
18
|
var protocol = chatPRTCL.active === 1 ? chatPRTCL.bosh : chatPRTCL.websocket;
|
|
20
19
|
var conn = new Strophe.Connection(protocol);
|
|
21
|
-
var onLogListener = config.debug
|
|
22
|
-
var chatLogger = Utils.QBLog;
|
|
20
|
+
var onLogListener = config.debug ? onLogListenerCallback : null;
|
|
23
21
|
var safeCallbackCall = function(message, data) {
|
|
24
|
-
onLogListener =
|
|
25
|
-
chatLogger = QBModules.getLogger();
|
|
22
|
+
onLogListener = config.debug ? onLogListenerCallback : null;
|
|
26
23
|
if (onLogListener && typeof onLogListener === 'function') {
|
|
27
24
|
Utils.safeCallbackCall(onLogListener,
|
|
28
25
|
'[QBChat][QBStrophe]' + message + data);
|