feat: accept invite code

This commit is contained in:
Davidson Gomes
2023-06-12 12:08:53 -03:00
parent ea9ba27f22
commit 5759341c52
4 changed files with 25 additions and 0 deletions

View File

@@ -1702,6 +1702,14 @@ export class WAStartupService {
}
}
public async acceptInvite(id: GroupInvite) {
try {
return await this.client.groupAcceptInvite(id.inviteCode);
} catch (error) {
throw new NotFoundException('No invite info', id.inviteCode);
}
}
public async revokeInviteCode(id: GroupJid) {
try {
const inviteCode = await this.client.groupRevokeInvite(id.groupJid);