Bugfix. onConnected overrides need to return promise.
This commit is contained in:
parent
bf9929b1e3
commit
5651f76373
@ -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 () {
|
||||
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user