Call destroy for the models instead of remove on the collection

So that the models get removed from the browser cache.
Otherwise they get re-fetched when we reconnect.
This commit is contained in:
JC Brand 2019-07-03 22:23:11 +02:00
parent e5188d8b10
commit 89ef9a18c4

View File

@ -433,7 +433,7 @@ converse.plugins.add('converse-muc', {
removeNonMembers () {
const non_members = this.occupants.filter(o => !o.isMember());
if (non_members.length) {
this.occupants.remove(non_members);
non_members.forEach(o => o.destroy());
}
},