mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-22 20:12:02 -06:00
fix: Session is now individual per instance and remoteJid
Changes made: - Added `instanceId` to sessions in DifyService, OpenaiService, and TypebotService to ensure that sessions are individual per instance and remoteJid. - Decreased delay time in BaileysStartupService from 2000ms to 1000ms. The bug fix ensures that sessions are unique per instance and remoteJid, which improves the overall functionality of the application. The delay time reduction in BaileysStartupService speeds up the pairing code request process. The modified files are DifyService, OpenaiService, TypebotService, and BaileysStartupService.
This commit is contained in:
parent
c74333719f
commit
9c5eb4bfd1
@ -896,6 +896,7 @@ export class DifyService {
|
||||
const session = await this.prismaRepository.difySession.findFirst({
|
||||
where: {
|
||||
remoteJid: remoteJid,
|
||||
instanceId: instance.instanceId,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -1094,6 +1094,7 @@ export class OpenaiService {
|
||||
const session = await this.prismaRepository.openaiSession.findFirst({
|
||||
where: {
|
||||
remoteJid: remoteJid,
|
||||
instanceId: instance.instanceId,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -1474,6 +1474,7 @@ export class TypebotService {
|
||||
const session = await this.prismaRepository.typebotSession.findFirst({
|
||||
where: {
|
||||
remoteJid: remoteJid,
|
||||
instanceId: instance.instanceId,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user