Commit 66fd9a9f authored by JC Brand's avatar JC Brand

muc: Fix: after reconnecting, already open room didn't receive new messages

parent 47cf5c19
......@@ -2069,7 +2069,9 @@
"Either when calling converse.initialize, or when calling " +
"_converse.api.user.login.");
}
this.connection.reset();
if (!this.connection.reconnecting) {
this.connection.reset();
}
this.connection.connect(this.jid.toLowerCase(), null, this.onConnectStatusChanged);
} else if (this.authentication === _converse.LOGIN) {
var password = _.isNil(credentials) ? (_converse.connection.pass || this.password) : credentials.password;
......@@ -2088,7 +2090,9 @@
} else {
this.jid = Strophe.getBareJidFromJid(this.jid).toLowerCase()+'/'+resource;
}
this.connection.reset();
if (!this.connection.reconnecting) {
this.connection.reset();
}
this.connection.connect(this.jid, password, this.onConnectStatusChanged);
}
};
......
......@@ -2785,7 +2785,9 @@
_converse.chatboxviews.each(function (view) {
if (view.model.get('type') === CHATROOMS_TYPE) {
view.model.save('connection_status', ROOMSTATUS.DISCONNECTED);
view.registerHandlers();
view.join();
view.fetchMessages();
}
});
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment