mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-17 04:32:53 -06:00
Refactor message deletion in BaileysStartupService
This commit is contained in:
parent
96821f5d9a
commit
4137984b5d
@ -3572,6 +3572,18 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
status: 'DELETED',
|
status: 'DELETED',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const messageUpdate: any = {
|
||||||
|
messageId: message.id,
|
||||||
|
keyId: messageId,
|
||||||
|
remoteJid: response.key.remoteJid,
|
||||||
|
fromMe: response.key.fromMe,
|
||||||
|
participant: response.key?.remoteJid,
|
||||||
|
status: 'DELETED',
|
||||||
|
instanceId: this.instanceId,
|
||||||
|
};
|
||||||
|
await this.prismaRepository.messageUpdate.create({
|
||||||
|
data: messageUpdate,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
await this.prismaRepository.message.deleteMany({
|
await this.prismaRepository.message.deleteMany({
|
||||||
where: {
|
where: {
|
||||||
|
Loading…
Reference in New Issue
Block a user