Bugfix. Also make sure to remove previous from/to class

This commit is contained in:
JC Brand 2015-04-09 10:35:12 +02:00
parent c05d17ca25
commit 2e11f99d82

View File

@ -3652,7 +3652,7 @@
converse.controlboxtoggle.showControlBox();
} else if (subscription === 'both' || subscription === 'to') {
this.$el.addClass('current-xmpp-contact');
this.$el.addClass(subscription);
this.$el.removeClass(_.without(['both', 'to'], subscription)[0]).addClass(subscription);
this.$el.html(converse.templates.roster_item(
_.extend(item.toJSON(), {
'desc_status': STATUSES[chat_status||'offline'],