Use User.group instead of iterating over groups

Thanks @moufmouf for pointing this out.
This commit is contained in:
PizZaKatZe 2021-12-15 13:21:30 +01:00
parent 1ab8165951
commit e528682403
2 changed files with 6 additions and 18 deletions

View file

@ -860,8 +860,7 @@ export class SocketManager {
room.sendToOthersInGroupIncludingUser(user, clientMessage);
// Update followers
const group = room.getGroupIncludingUser(user);
group?.getUsers().forEach((user) => {
user.group?.getUsers().forEach((user) => {
user.following = [];
});
} else {