瀏覽代碼

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

ichim-david 12 年之前
父節點
當前提交
d8d3a34737
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      converse.js

+ 6 - 1
converse.js

@@ -1251,7 +1251,12 @@
                         $(this).dialog( "close" );
                         $(this).dialog( "close" );
                         xmppchat.connection.roster.remove(bare_jid, function (iq) {
                         xmppchat.connection.roster.remove(bare_jid, function (iq) {
                             xmppchat.connection.roster.unauthorize(bare_jid);
                             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() {
                     "Cancel": function() {