Przeglądaj źródła

Don't check for allow_contact_requests in RosterItemView render method

This method shouldn't be called when contact requests aren't allowed because
roster items are then not created for contact requests.
JC Brand 11 lat temu
rodzic
commit
ef1c834090
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      converse.js

+ 4 - 4
converse.js

@@ -1919,18 +1919,18 @@
 
 
                 this.$el.addClass(item.get('chat_status'));
                 this.$el.addClass(item.get('chat_status'));
 
 
-                if ((ask === 'subscribe') && (converse.allow_contact_requests)) {
+                if (ask === 'subscribe') {
                     this.$el.addClass('pending-xmpp-contact');
                     this.$el.addClass('pending-xmpp-contact');
                     this.$el.html(this.pending_template(item.toJSON()));
                     this.$el.html(this.pending_template(item.toJSON()));
-                } else if ((ask === 'request') && (converse.allow_contact_requests)) {
+                } else if (ask === 'request') {
                     this.$el.addClass('requesting-xmpp-contact');
                     this.$el.addClass('requesting-xmpp-contact');
                     this.$el.html(this.request_template(item.toJSON()));
                     this.$el.html(this.request_template(item.toJSON()));
                     converse.showControlBox();
                     converse.showControlBox();
-                } else if (subscription === 'both' || ((subscription === 'to') && converse.allow_contact_requests)) {
+                } else if (subscription === 'both' || subscription === 'to') {
                     this.$el.addClass('current-xmpp-contact');
                     this.$el.addClass('current-xmpp-contact');
                     this.$el.html(this.template(
                     this.$el.html(this.template(
                         _.extend(item.toJSON(), {'status_desc': statuses[item.get('chat_status')||'offline']})
                         _.extend(item.toJSON(), {'status_desc': statuses[item.get('chat_status')||'offline']})
-                        ));
+                    ));
                 }
                 }
                 return this;
                 return this;
             },
             },