We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9925505 commit e14f955Copy full SHA for e14f955
1 file changed
apps/meteor/app/lib/server/functions/getRoomsWithSingleOwner.ts
@@ -51,7 +51,7 @@ export async function getSubscribedRoomsForUserWithDetails(
51
u: { _id: uid },
52
} of subscribersCursor) {
53
// If we already changed the owner or this subscription is for the user we are removing, then don't try to give it ownership
54
- if (roomData.shouldChangeOwner || uid === userId) {
+ if (uid === userId) {
55
continue;
56
}
57
const newOwner = await Users.findOneActiveById(uid, { projection: { _id: 1 } });
@@ -61,6 +61,7 @@ export async function getSubscribedRoomsForUserWithDetails(
61
62
roomData.newOwner = uid;
63
roomData.shouldChangeOwner = true;
64
+ break;
65
66
67
// If there's no subscriber available to be the new owner and it's not a public room, we can remove it.
0 commit comments