feat: #11420, add new GET routes to retrieve pending and invited members of a group, plus accept/reject pending

This commit is contained in:
Julian Lam
2023-03-30 15:46:40 -04:00
parent cc1c493bbf
commit 0788fb5118
9 changed files with 98 additions and 31 deletions

View File

@@ -944,7 +944,8 @@ describe('Groups', () => {
]);
await requestMembership(uid1, uid2);
await socketGroups.rejectAll({ uid: adminUid }, { groupName: 'PrivateCanJoin' });
const pending = await Groups.getPending('PrivateCanJoin');
let pending = await Groups.getPending('PrivateCanJoin');
pending = pending.map(u => u.uid);
assert.equal(pending.length, 0);
await requestMembership(uid1, uid2);
await socketGroups.acceptAll({ uid: adminUid }, { groupName: 'PrivateCanJoin' });