make Groups more resilient

This commit is contained in:
MathMan05
2025-11-30 12:36:45 -06:00
parent 0cea8c4e0e
commit a3c443e75b
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -519,6 +519,7 @@ class Group extends Channel {
}
addRec(user: User) {
this.users.push(user);
this.users = [...new Set(this.users)];
if (this.localuser.channelfocus === this) {
this.localuser.memberListUpdate();
}
+2 -2
View File
@@ -1167,9 +1167,9 @@ class Localuser {
}
elms.set("online", []);
elms.set("offline", []);
const members = new Set<User | Member>(guild.members);
let members = new Set<User | Member>(guild.members);
if (channel instanceof Group) {
channel.users.forEach((user) => members.add(user));
members = new Set(channel.users);
members.add(this.user);
}
members.forEach((member) => {