mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
refactor: simplifica a lógica de terminação de chamada
This commit is contained in:
parent
b80b203670
commit
0af00582f0
@ -1677,11 +1677,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
try {
|
||||
const call = await this.client.offerCall(jid);
|
||||
if (callDuration) {
|
||||
setTimeout(async () => {
|
||||
console.log('Terminating call');
|
||||
const aaa = await this.client.terminateCall(call.id, call.to);
|
||||
console.log(aaa);
|
||||
}, callDuration * 1000);
|
||||
setTimeout(() => this.client.terminateCall(call.id, call.to), callDuration * 1000);
|
||||
}
|
||||
|
||||
return call;
|
||||
|
Loading…
Reference in New Issue
Block a user