浏览代码

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

JC Brand 10 年之前
父节点
当前提交
2e11f99d82
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      converse.js

+ 1 - 1
converse.js

@@ -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'],