quickblox 2.17.16-logger → 2.17.18-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quickblox",
3
3
  "description": "QuickBlox JavaScript SDK",
4
- "version": "2.17.16-logger",
4
+ "version": "2.17.18-logger",
5
5
  "homepage": "https://quickblox.com/developers/Javascript",
6
6
  "main": "src/qbMain.js",
7
7
  "types": "quickblox.d.ts",
package/quickblox.js CHANGED
@@ -42973,7 +42973,7 @@ function ChatProxy(service) {
42973
42973
  */
42974
42974
  if (Utils.getEnv().browser) {
42975
42975
  // strophe js
42976
- self.connection = Connection(self.onLogListener);
42976
+ self.connection = Connection(self._OnLogListener);
42977
42977
 
42978
42978
  /** Add extension methods to track handlers for removal on reconnect */
42979
42979
  self.connection.XHandlerReferences = [];
@@ -43229,7 +43229,6 @@ function ChatProxy(service) {
43229
43229
  * @memberOf QB.chat
43230
43230
  **/
43231
43231
 
43232
-
43233
43232
  this._onMessage = function (stanza) {
43234
43233
  var from = chatUtils.getAttr(stanza, 'from'),
43235
43234
  to = chatUtils.getAttr(stanza, 'to'),
@@ -43635,6 +43634,12 @@ function ChatProxy(service) {
43635
43634
  ----------------------------------------------------------------------------- */
43636
43635
  ChatProxy.prototype = {
43637
43636
 
43637
+ _OnLogListener: function (message) {
43638
+ if (typeof this.onLogListener === 'function') {
43639
+ Utils.safeCallbackCall(this.onLogListener, message);
43640
+ }
43641
+ },
43642
+
43638
43643
  /**
43639
43644
  * self.connection to the chat. {@link https://quickblox.com/developers/Web_XMPP_Chat_Sample#Login_to_Chat More info.}
43640
43645
  * @memberof QB.chat
@@ -51494,7 +51499,7 @@ module.exports = StreamManagement;
51494
51499
  */
51495
51500
 
51496
51501
  var config = {
51497
- version: '2.17.16-logger',
51502
+ version: '2.17.18-logger',
51498
51503
  buildNumber: '1161',
51499
51504
  creds: {
51500
51505
  'appId': 0,
@@ -52215,16 +52220,13 @@ require('./libs/strophe/strophe.umd.js');
52215
52220
  var config = require('./qbConfig');
52216
52221
  var chatPRTCL = config.chatProtocol;
52217
52222
  var Utils = require('./qbUtils');
52218
- var QBModules = require('./qbMain');
52219
52223
 
52220
52224
  function Connection(onLogListenerCallback) {
52221
52225
  var protocol = chatPRTCL.active === 1 ? chatPRTCL.bosh : chatPRTCL.websocket;
52222
52226
  var conn = new Strophe.Connection(protocol);
52223
- var onLogListener = config.debug && (QBModules.getChat() || onLogListenerCallback)? onLogListenerCallback || QBModules.getChat().onLogListener : null;
52224
- var chatLogger = Utils.QBLog;
52227
+ var onLogListener = config.debug ? onLogListenerCallback : null;
52225
52228
  var safeCallbackCall = function(message, data) {
52226
- onLogListener = onLogListenerCallback || QBModules.getChat() ? QBModules.getChat().onLogListener : null;
52227
- chatLogger = QBModules.getLogger();
52229
+ onLogListener = config.debug ? onLogListenerCallback : null;
52228
52230
  if (onLogListener && typeof onLogListener === 'function') {
52229
52231
  Utils.safeCallbackCall(onLogListener,
52230
52232
  '[QBChat][QBStrophe]' + message + data);
@@ -52279,7 +52281,7 @@ function Connection(onLogListenerCallback) {
52279
52281
 
52280
52282
  module.exports = Connection;
52281
52283
 
52282
- },{"./libs/strophe/strophe.umd.js":227,"./qbConfig":247,"./qbMain":248,"./qbUtils":251}],251:[function(require,module,exports){
52284
+ },{"./libs/strophe/strophe.umd.js":227,"./qbConfig":247,"./qbUtils":251}],251:[function(require,module,exports){
52283
52285
  (function (global){(function (){
52284
52286
  /* eslint no-console: 2 */
52285
52287