mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 19:32:21 -06:00
some fixs
This commit is contained in:
@@ -1085,9 +1085,14 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
|
||||
this.sendDataWebhook(Events.CHATS_UPSERT, [chatToInsert]);
|
||||
if (this.configService.get<Database>('DATABASE').SAVE_DATA.CHATS) {
|
||||
await this.prismaRepository.chat.create({
|
||||
data: chatToInsert,
|
||||
});
|
||||
try {
|
||||
await this.prismaRepository.chat.create({
|
||||
data: chatToInsert,
|
||||
});
|
||||
}
|
||||
catch(error){
|
||||
console.log(`Chat insert record ignored: ${chatToInsert.remoteJid} - ${chatToInsert.instanceId}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1420,9 +1425,14 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
|
||||
this.sendDataWebhook(Events.CHATS_UPSERT, [chatToInsert]);
|
||||
if (this.configService.get<Database>('DATABASE').SAVE_DATA.CHATS) {
|
||||
await this.prismaRepository.chat.create({
|
||||
data: chatToInsert,
|
||||
});
|
||||
try {
|
||||
await this.prismaRepository.chat.create({
|
||||
data: chatToInsert,
|
||||
});
|
||||
}
|
||||
catch(error){
|
||||
console.log(`Chat insert record ignored: ${chatToInsert.remoteJid} - ${chatToInsert.instanceId}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user