quickblox 2.17.15-logger → 2.17.17-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.
@@ -39,7 +39,7 @@ function ChatProxy(service) {
39
39
  */
40
40
  if (Utils.getEnv().browser) {
41
41
  // strophe js
42
- self.connection = Connection(self.onLogListener);
42
+ self.connection = Connection(self._OnLogListener);
43
43
 
44
44
  /** Add extension methods to track handlers for removal on reconnect */
45
45
  self.connection.XHandlerReferences = [];
@@ -295,7 +295,6 @@ function ChatProxy(service) {
295
295
  * @memberOf QB.chat
296
296
  **/
297
297
 
298
-
299
298
  this._onMessage = function (stanza) {
300
299
  var from = chatUtils.getAttr(stanza, 'from'),
301
300
  to = chatUtils.getAttr(stanza, 'to'),
@@ -701,6 +700,12 @@ function ChatProxy(service) {
701
700
  ----------------------------------------------------------------------------- */
702
701
  ChatProxy.prototype = {
703
702
 
703
+ _OnLogListener: function (message) {
704
+ if (typeof this.onLogListener === 'function') {
705
+ Utils.safeCallbackCall(this.onLogListener, message);
706
+ }
707
+ },
708
+
704
709
  /**
705
710
  * self.connection to the chat. {@link https://quickblox.com/developers/Web_XMPP_Chat_Sample#Login_to_Chat More info.}
706
711
  * @memberof QB.chat
package/src/qbConfig.js CHANGED
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  var config = {
15
- version: '2.17.15-logger',
15
+ version: '2.17.17-logger',
16
16
  buildNumber: '1161',
17
17
  creds: {
18
18
  'appId': 0,
package/src/qbMain.js CHANGED
@@ -269,11 +269,11 @@ QuickBlox.prototype = {
269
269
  },
270
270
 
271
271
  getChat: function() {
272
- return this.chat;
272
+ return QB.chat;
273
273
  },
274
274
 
275
275
  getLogger: function() {
276
- return this.chat? this.chat.onLogListener: null;
276
+ return QB.chat? QB.chat.onLogListener: null;
277
277
  }
278
278
 
279
279
  };