Explorar o código

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

JC Brand %!s(int64=10) %!d(string=hai) anos
pai
achega
2e11f99d82
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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'],