diff --git a/src/converse-minimize.js b/src/converse-minimize.js index 02ade1065..e02c12628 100644 --- a/src/converse-minimize.js +++ b/src/converse-minimize.js @@ -44,7 +44,7 @@ converse.minimized_chats = new converse.MinimizedChats({ model: converse.chatboxes }); - this._super.onConnected.apply(this, arguments); + return this._super.onConnected.apply(this, arguments); }, registerGlobalEventHandlers: function () { diff --git a/src/converse-ping.js b/src/converse-ping.js index 2fcbc7d72..e69a63053 100644 --- a/src/converse-ping.js +++ b/src/converse-ping.js @@ -32,12 +32,16 @@ // New functions which don't exist yet can also be added. onConnected: function () { - this._super.onConnected().done(converse.registerPingHandler); + var promise = this._super.onConnected(); + promise.done(converse.registerPingHandler); + return promise; }, onReconnected: function () { // We need to re-register the ping event handler on the newly // created connection. - this._super.onReconnected().done(converse.registerPingHandler); + var promise = this._super.onReconnected(); + promise.done(converse.registerPingHandler); + return promise; } },