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

This commit is contained in:
ichim-david 2013-02-23 15:43:20 +02:00
parent 083f76b7cc
commit d8d3a34737

View File

@ -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() {