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.
- package/package.json +1 -1
- package/quickblox.js +10 -5
- package/quickblox.min.js +1 -1
- package/src/modules/chat/qbChat.js +7 -2
- package/src/qbConfig.js +1 -1
- package/src/qbMain.js +2 -2
|
@@ -39,7 +39,7 @@ function ChatProxy(service) {
|
|
|
39
39
|
*/
|
|
40
40
|
if (Utils.getEnv().browser) {
|
|
41
41
|
// strophe js
|
|
42
|
-
self.connection = Connection(self.
|
|
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
package/src/qbMain.js
CHANGED
|
@@ -269,11 +269,11 @@ QuickBlox.prototype = {
|
|
|
269
269
|
},
|
|
270
270
|
|
|
271
271
|
getChat: function() {
|
|
272
|
-
return
|
|
272
|
+
return QB.chat;
|
|
273
273
|
},
|
|
274
274
|
|
|
275
275
|
getLogger: function() {
|
|
276
|
-
return
|
|
276
|
+
return QB.chat? QB.chat.onLogListener: null;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
};
|