mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
treating errors gracefully
This commit is contained in:
parent
f695e8bdc9
commit
17bd108251
@ -1,7 +1,7 @@
|
||||
services:
|
||||
api:
|
||||
container_name: evolution_api
|
||||
image: evoapicloud/evolution-api:latest
|
||||
build: .
|
||||
restart: always
|
||||
depends_on:
|
||||
- redis
|
||||
|
@ -3980,6 +3980,17 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
edit: data.key,
|
||||
});
|
||||
if (messageSent) {
|
||||
const editedMessage = messageSent?.message?.protocolMessage || messageSent?.message?.editedMessage?.message?.protocolMessage;
|
||||
|
||||
if (editedMessage) {
|
||||
this.sendDataWebhook(Events.SEND_MESSAGE_UPDATE, editedMessage);
|
||||
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot?.enabled)
|
||||
this.chatwootService.eventWhatsapp(
|
||||
'send.message.update',
|
||||
{ instanceName: this.instance.name, instanceId: this.instance.id },
|
||||
editedMessage,
|
||||
);
|
||||
|
||||
const messageId = messageSent.message?.protocolMessage?.key?.id;
|
||||
if (messageId) {
|
||||
let message = await this.prismaRepository.message.findFirst({
|
||||
@ -4023,10 +4034,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
await this.prismaRepository.messageUpdate.create({
|
||||
data: messageUpdate,
|
||||
});
|
||||
|
||||
const editedMessage = messageSent?.message?.protocolMessage || messageSent?.message?.editedMessage?.message?.protocolMessage;
|
||||
|
||||
this.sendDataWebhook(Events.SEND_MESSAGE_UPDATE, editedMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user