feat: Route to fetch all groups that the connection is part of

This commit is contained in:
Davidson Gomes
2023-06-11 11:00:40 -03:00
parent 75b8bcb853
commit ea8d6bf6c8
5 changed files with 54 additions and 0 deletions

View File

@@ -1610,6 +1610,14 @@ export class WAStartupService {
}
}
public async fetchAllGroups() {
try {
return await this.client.groupFetchAllParticipating();
} catch (error) {
throw new NotFoundException('Error fetching group', error.toString());
}
}
public async inviteCode(id: GroupJid) {
try {
const code = await this.client.groupInviteCode(id.groupJid);