Browse Source

Fixed a bug where controlbox wasn't available on xmppchat.chatboxesview, instead pass the removal of the model to rosterview.model

ichim-david 12 years ago
parent
commit
d8d3a34737
1 changed files with 6 additions and 1 deletions
  1. 6 1
      converse.js

+ 6 - 1
converse.js

@@ -1251,7 +1251,12 @@
                         $(this).dialog( "close" );
                         xmppchat.connection.roster.remove(bare_jid, function (iq) {
                             xmppchat.connection.roster.unauthorize(bare_jid);
-                            xmppchat.chatboxesview.controlbox.roster.remove(bare_jid);
+                            // TODO inspect if chatboxes ever receives controlbox
+                            if (xmppchat.chatboxesview.controlbox) {
+                                xmppchat.chatboxesview.controlbox.roster.remove(bare_jid);
+                            }
+                            // remove model from view roster
+                            xmppchat.rosterview.model.remove(bare_jid);
                         });
                     },
                     "Cancel": function() {