mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
fix: add validation to prevent group calls in whatsapp.baileys.service.ts
Added a check to prevent group calls by throwing a BadRequestException when a group JID is detected. This change ensures that only individual calls are processed, preventing unsupported group call attempts and improving error handling.
This commit is contained in:
parent
92a0d8ccc9
commit
2d49c73023
@ -3438,6 +3438,11 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
public async fakeCall(data: FakeCallDto) {
|
||||
try {
|
||||
const number = this.createJid(data.number);
|
||||
|
||||
if (number.includes('@g.us')) {
|
||||
throw new BadRequestException('Group calls are not supported');
|
||||
}
|
||||
|
||||
const mdDelay = data.delay ?? 0;
|
||||
|
||||
const call = await this.client.offerCall(number);
|
||||
|
Loading…
Reference in New Issue
Block a user