simple add keep open

This commit is contained in:
Gabriel Pastori
2023-12-15 12:39:07 -03:00
parent f612a45550
commit ff82987144
4 changed files with 7 additions and 1 deletions

View File

@@ -16,6 +16,9 @@ export class TypebotService {
private readonly eventEmitter: EventEmitter2,
) {
this.eventEmitter.on('typebot:end', async (data) => {
const keep_open = this.configService.get<Typebot>('TYPEBOT').KEEP_OPEN;
if (keep_open) return;
await this.clearSessions(data.instance, data.remoteJid);
});
}