Commit 0a99b9f2 authored by JC Brand's avatar JC Brand

Don't query for room features for restored chat rooms.

parent efa87768
...@@ -357,12 +357,18 @@ ...@@ -357,12 +357,18 @@
// Which for some reason doesn't work. // Which for some reason doesn't work.
// So working around that fact here: // So working around that fact here:
this.$el.find('.chat-content').on('scroll', this.markScrolled.bind(this)); this.$el.find('.chat-content').on('scroll', this.markScrolled.bind(this));
this.getRoomFeatures().always(function () { this.registerHandlers();
that.join(); if (this.model.get('connection_status') !== Strophe.Status.CONNECTED) {
that.fetchMessages(); this.getRoomFeatures().always(function () {
that.join();
that.fetchMessages();
_converse.emit('chatRoomOpened', that);
});
} else {
this.fetchMessages();
_converse.emit('chatRoomOpened', that); _converse.emit('chatRoomOpened', that);
}); }
}, },
render: function () { render: function () {
...@@ -1105,7 +1111,6 @@ ...@@ -1105,7 +1111,6 @@
if (!nick) { if (!nick) {
return this.checkForReservedNick(); return this.checkForReservedNick();
} }
this.registerHandlers();
if (this.model.get('connection_status') === Strophe.Status.CONNECTED) { if (this.model.get('connection_status') === Strophe.Status.CONNECTED) {
// We have restored a chat room from session storage, // We have restored a chat room from session storage,
// so we don't send out a presence stanza again. // so we don't send out a presence stanza again.
......
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