bookmarks: Handle chat box being passed into renderBookmarkListElement

This commit is contained in:
JC Brand 2017-05-07 20:36:40 +02:00
parent 3835ab7af6
commit 1ef99b3ecc

View File

@ -401,6 +401,12 @@
},
renderBookmarkListElement: function (item) {
if (item instanceof _converse.ChatBox) {
item = _.head(this.model.where({'jid': item.get('jid')}));
if (_.isNil(item)) {
return;
}
}
if (_converse.hide_open_bookmarks &&
_converse.chatboxes.where({'jid': item.get('jid')}).length) {
this.removeBookmarkListElement(item);