mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2026-01-25 13:00:01 -06:00
refactor: simplifica a lógica de terminação de chamada
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user