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({
|
converse.minimized_chats = new converse.MinimizedChats({
|
||||||
model: converse.chatboxes
|
model: converse.chatboxes
|
||||||
});
|
});
|
||||||
this._super.onConnected.apply(this, arguments);
|
return this._super.onConnected.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
registerGlobalEventHandlers: function () {
|
registerGlobalEventHandlers: function () {
|
||||||
|
@ -32,12 +32,16 @@
|
|||||||
// New functions which don't exist yet can also be added.
|
// New functions which don't exist yet can also be added.
|
||||||
|
|
||||||
onConnected: function () {
|
onConnected: function () {
|
||||||
this._super.onConnected().done(converse.registerPingHandler);
|
var promise = this._super.onConnected();
|
||||||
|
promise.done(converse.registerPingHandler);
|
||||||
|
return promise;
|
||||||
},
|
},
|
||||||
onReconnected: function () {
|
onReconnected: function () {
|
||||||
// We need to re-register the ping event handler on the newly
|
// We need to re-register the ping event handler on the newly
|
||||||
// created connection.
|
// 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