Browse Source

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.
JC Brand 6 years ago
parent
commit
89ef9a18c4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/headless/converse-muc.js

+ 1 - 1
src/headless/converse-muc.js

@@ -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());
                 }
             },