diff --git a/src/api/integrations/dify/services/dify.service.ts b/src/api/integrations/dify/services/dify.service.ts index a78e3552..ffe3312e 100644 --- a/src/api/integrations/dify/services/dify.service.ts +++ b/src/api/integrations/dify/services/dify.service.ts @@ -896,6 +896,7 @@ export class DifyService { const session = await this.prismaRepository.difySession.findFirst({ where: { remoteJid: remoteJid, + instanceId: instance.instanceId, }, }); diff --git a/src/api/integrations/openai/services/openai.service.ts b/src/api/integrations/openai/services/openai.service.ts index f5850cd7..21b14a44 100644 --- a/src/api/integrations/openai/services/openai.service.ts +++ b/src/api/integrations/openai/services/openai.service.ts @@ -1094,6 +1094,7 @@ export class OpenaiService { const session = await this.prismaRepository.openaiSession.findFirst({ where: { remoteJid: remoteJid, + instanceId: instance.instanceId, }, }); diff --git a/src/api/integrations/typebot/services/typebot.service.ts b/src/api/integrations/typebot/services/typebot.service.ts index 7fcb1696..fd8ce1c8 100644 --- a/src/api/integrations/typebot/services/typebot.service.ts +++ b/src/api/integrations/typebot/services/typebot.service.ts @@ -1474,6 +1474,7 @@ export class TypebotService { const session = await this.prismaRepository.typebotSession.findFirst({ where: { remoteJid: remoteJid, + instanceId: instance.instanceId, }, }); diff --git a/src/api/services/channels/whatsapp.baileys.service.ts b/src/api/services/channels/whatsapp.baileys.service.ts index 7507b83c..714deea4 100644 --- a/src/api/services/channels/whatsapp.baileys.service.ts +++ b/src/api/services/channels/whatsapp.baileys.service.ts @@ -320,7 +320,7 @@ export class BaileysStartupService extends ChannelStartupService { }; if (this.phoneNumber) { - await delay(2000); + await delay(1000); this.instance.qrcode.pairingCode = await this.client.requestPairingCode(this.phoneNumber); } else { this.instance.qrcode.pairingCode = null;