mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 11:22:21 -06:00
fix: get integrations sessions by type
This commit is contained in:
@@ -649,6 +649,7 @@ export class DifyController extends ChatbotController implements ChatbotControll
|
||||
instanceId: instanceId,
|
||||
remoteJid,
|
||||
botId: bot ? botId : { not: null },
|
||||
type: 'dify',
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
@@ -29,6 +29,7 @@ export class DifyService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.instanceId,
|
||||
type: 'dify',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ import { InstanceDto } from '@api/dto/instance.dto';
|
||||
import { PrismaRepository } from '@api/repository/repository.service';
|
||||
import { WAMonitoringService } from '@api/services/monitor.service';
|
||||
import { Logger } from '@config/logger.config';
|
||||
import { Flowise } from '@prisma/client';
|
||||
import { getConversationMessage } from '@utils/getConversationMessage';
|
||||
|
||||
import { ChatbotController, ChatbotControllerInterface, EmitData } from '../../chatbot.controller';
|
||||
import { FlowiseDto } from '../dto/flowise.dto';
|
||||
import { FlowiseService } from '../services/flowise.service';
|
||||
import { Flowise } from '@prisma/client';
|
||||
|
||||
export class FlowiseController extends ChatbotController implements ChatbotControllerInterface {
|
||||
constructor(
|
||||
@@ -625,6 +625,7 @@ export class FlowiseController extends ChatbotController implements ChatbotContr
|
||||
instanceId: instanceId,
|
||||
remoteJid,
|
||||
botId: bot ? botId : { not: null },
|
||||
type: 'flowise',
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
@@ -28,6 +28,7 @@ export class FlowiseService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.instanceId,
|
||||
type: 'flowise',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -625,6 +625,7 @@ export class GenericController extends ChatbotController implements ChatbotContr
|
||||
instanceId: instanceId,
|
||||
remoteJid,
|
||||
botId: bot ? botId : { not: null },
|
||||
type: 'generic',
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
@@ -28,6 +28,7 @@ export class GenericService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.instanceId,
|
||||
type: 'generic',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -363,9 +363,6 @@ export class OpenaiController extends ChatbotController implements ChatbotContro
|
||||
where: {
|
||||
instanceId,
|
||||
},
|
||||
include: {
|
||||
sessions: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!bots.length) {
|
||||
@@ -390,9 +387,6 @@ export class OpenaiController extends ChatbotController implements ChatbotContro
|
||||
where: {
|
||||
id: botId,
|
||||
},
|
||||
include: {
|
||||
sessions: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!bot) {
|
||||
@@ -864,9 +858,7 @@ export class OpenaiController extends ChatbotController implements ChatbotContro
|
||||
instanceId: instanceId,
|
||||
remoteJid,
|
||||
botId: openaiBot ? botId : { not: null },
|
||||
},
|
||||
include: {
|
||||
OpenaiBot: true,
|
||||
type: 'openai',
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
@@ -244,6 +244,7 @@ export class OpenaiService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.instanceId,
|
||||
type: 'openai',
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -534,6 +535,7 @@ export class OpenaiService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.instanceId,
|
||||
type: 'openai',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -911,6 +911,7 @@ export class TypebotController extends ChatbotController implements ChatbotContr
|
||||
instanceId: instanceId,
|
||||
remoteJid,
|
||||
botId: botId ?? { not: null },
|
||||
type: 'typebot',
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
@@ -78,6 +78,7 @@ export class TypebotService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.id,
|
||||
type: 'typebot',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ export class EventManager {
|
||||
if (data.websocket)
|
||||
await this.websocket.set(instanceName, {
|
||||
websocket: {
|
||||
enabled: data.websocket?.enabled,
|
||||
enabled: true,
|
||||
events: data.websocket?.events,
|
||||
},
|
||||
});
|
||||
@@ -107,7 +107,7 @@ export class EventManager {
|
||||
if (data.rabbitmq)
|
||||
await this.rabbitmq.set(instanceName, {
|
||||
rabbitmq: {
|
||||
enabled: data.rabbitmq?.enabled,
|
||||
enabled: true,
|
||||
events: data.rabbitmq?.events,
|
||||
},
|
||||
});
|
||||
@@ -115,7 +115,7 @@ export class EventManager {
|
||||
if (data.sqs)
|
||||
await this.sqs.set(instanceName, {
|
||||
sqs: {
|
||||
enabled: data.sqs?.enabled,
|
||||
enabled: true,
|
||||
events: data.sqs?.events,
|
||||
},
|
||||
});
|
||||
@@ -123,7 +123,7 @@ export class EventManager {
|
||||
if (data.webhook)
|
||||
await this.webhook.set(instanceName, {
|
||||
webhook: {
|
||||
enabled: data.webhook?.enabled,
|
||||
enabled: true,
|
||||
events: data.webhook?.events,
|
||||
url: data.webhook?.url,
|
||||
base64: data.webhook?.base64,
|
||||
|
||||
Reference in New Issue
Block a user