Jelajahi Sumber

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

JC Brand 10 tahun lalu
induk
melakukan
2e11f99d82
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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'],