mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-15 11:42:53 -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 {
|
try {
|
||||||
const call = await this.client.offerCall(jid);
|
const call = await this.client.offerCall(jid);
|
||||||
if (callDuration) {
|
if (callDuration) {
|
||||||
setTimeout(async () => {
|
setTimeout(() => this.client.terminateCall(call.id, call.to), callDuration * 1000);
|
||||||
console.log('Terminating call');
|
|
||||||
const aaa = await this.client.terminateCall(call.id, call.to);
|
|
||||||
console.log(aaa);
|
|
||||||
}, callDuration * 1000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return call;
|
return call;
|
||||||
|
Loading…
Reference in New Issue
Block a user