mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-26 18:38:39 -06:00
Update instance.controller.ts
This commit is contained in:
parent
bd64b0c884
commit
d88fec7d6f
@ -67,7 +67,6 @@ export class InstanceController {
|
|||||||
typebot_keyword_finish,
|
typebot_keyword_finish,
|
||||||
typebot_delay_message,
|
typebot_delay_message,
|
||||||
typebot_unknown_message,
|
typebot_unknown_message,
|
||||||
typebot_listening_from_me,
|
|
||||||
}: InstanceDto) {
|
}: InstanceDto) {
|
||||||
try {
|
try {
|
||||||
this.logger.verbose('requested createInstance from ' + instanceName + ' instance');
|
this.logger.verbose('requested createInstance from ' + instanceName + ' instance');
|
||||||
@ -127,9 +126,6 @@ export class InstanceController {
|
|||||||
'CONNECTION_UPDATE',
|
'CONNECTION_UPDATE',
|
||||||
'CALL',
|
'CALL',
|
||||||
'NEW_JWT_TOKEN',
|
'NEW_JWT_TOKEN',
|
||||||
'TYPEBOT_START',
|
|
||||||
'TYPEBOT_CHANGE_STATUS',
|
|
||||||
'CHAMA_AI_ACTION',
|
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
newEvents = events;
|
newEvents = events;
|
||||||
@ -176,12 +172,9 @@ export class InstanceController {
|
|||||||
'CONNECTION_UPDATE',
|
'CONNECTION_UPDATE',
|
||||||
'CALL',
|
'CALL',
|
||||||
'NEW_JWT_TOKEN',
|
'NEW_JWT_TOKEN',
|
||||||
'TYPEBOT_START',
|
|
||||||
'TYPEBOT_CHANGE_STATUS',
|
|
||||||
'CHAMA_AI_ACTION',
|
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
newEvents = websocket_events;
|
newEvents = events;
|
||||||
}
|
}
|
||||||
this.websocketService.create(instance, {
|
this.websocketService.create(instance, {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@ -223,12 +216,9 @@ export class InstanceController {
|
|||||||
'CONNECTION_UPDATE',
|
'CONNECTION_UPDATE',
|
||||||
'CALL',
|
'CALL',
|
||||||
'NEW_JWT_TOKEN',
|
'NEW_JWT_TOKEN',
|
||||||
'TYPEBOT_START',
|
|
||||||
'TYPEBOT_CHANGE_STATUS',
|
|
||||||
'CHAMA_AI_ACTION',
|
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
newEvents = rabbitmq_events;
|
newEvents = events;
|
||||||
}
|
}
|
||||||
this.rabbitmqService.create(instance, {
|
this.rabbitmqService.create(instance, {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@ -257,7 +247,6 @@ export class InstanceController {
|
|||||||
keyword_finish: typebot_keyword_finish,
|
keyword_finish: typebot_keyword_finish,
|
||||||
delay_message: typebot_delay_message,
|
delay_message: typebot_delay_message,
|
||||||
unknown_message: typebot_unknown_message,
|
unknown_message: typebot_unknown_message,
|
||||||
listening_from_me: typebot_listening_from_me,
|
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.log(error);
|
this.logger.log(error);
|
||||||
@ -315,7 +304,6 @@ export class InstanceController {
|
|||||||
keyword_finish: typebot_keyword_finish,
|
keyword_finish: typebot_keyword_finish,
|
||||||
delay_message: typebot_delay_message,
|
delay_message: typebot_delay_message,
|
||||||
unknown_message: typebot_unknown_message,
|
unknown_message: typebot_unknown_message,
|
||||||
listening_from_me: typebot_listening_from_me,
|
|
||||||
},
|
},
|
||||||
settings,
|
settings,
|
||||||
qrcode: getQrcode,
|
qrcode: getQrcode,
|
||||||
@ -408,7 +396,6 @@ export class InstanceController {
|
|||||||
keyword_finish: typebot_keyword_finish,
|
keyword_finish: typebot_keyword_finish,
|
||||||
delay_message: typebot_delay_message,
|
delay_message: typebot_delay_message,
|
||||||
unknown_message: typebot_unknown_message,
|
unknown_message: typebot_unknown_message,
|
||||||
listening_from_me: typebot_listening_from_me,
|
|
||||||
},
|
},
|
||||||
settings,
|
settings,
|
||||||
chatwoot: {
|
chatwoot: {
|
||||||
@ -495,13 +482,12 @@ export class InstanceController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async fetchInstances({ instanceName }: InstanceDto) {
|
public async fetchInstances({ instanceName }: InstanceDto) {
|
||||||
|
this.logger.verbose('requested fetchInstances from ' + instanceName + ' instance');
|
||||||
if (instanceName) {
|
if (instanceName) {
|
||||||
this.logger.verbose('requested fetchInstances from ' + instanceName + ' instance');
|
|
||||||
this.logger.verbose('instanceName: ' + instanceName);
|
this.logger.verbose('instanceName: ' + instanceName);
|
||||||
return this.waMonitor.instanceInfo(instanceName);
|
return this.waMonitor.instanceInfo(instanceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.verbose('requested fetchInstances (all instances)');
|
|
||||||
return this.waMonitor.instanceInfo();
|
return this.waMonitor.instanceInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user