Bail when in a callback for a hanging chatroom

This commit is contained in:
JC Brand 2018-04-30 15:24:12 +02:00
parent 3a37577252
commit 4f7c08b1da

View File

@ -531,6 +531,12 @@
if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
const handler = () => {
if (!u.isPersistableModel(this.model)) {
// Happens during tests, nothing to do if this
// is a hanging chatbox (i.e. not in the
// collection anymore).
return;
}
this.join();
this.fetchMessages();
_converse.emit('chatRoomOpened', this);