mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-26 10:28:38 -06:00
refactor: simplify edited message check in BaileysStartupService
This commit is contained in:
parent
d458c978f3
commit
419300b31f
@ -1078,7 +1078,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
const editedMessage =
|
const editedMessage =
|
||||||
received?.message?.protocolMessage || received?.message?.editedMessage?.message?.protocolMessage;
|
received?.message?.protocolMessage || received?.message?.editedMessage?.message?.protocolMessage;
|
||||||
|
|
||||||
if (received.message?.protocolMessage?.editedMessage && editedMessage) {
|
if (editedMessage) {
|
||||||
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot?.enabled)
|
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot?.enabled)
|
||||||
this.chatwootService.eventWhatsapp(
|
this.chatwootService.eventWhatsapp(
|
||||||
'messages.edit',
|
'messages.edit',
|
||||||
@ -1126,7 +1126,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
(type !== 'notify' && type !== 'append') ||
|
(type !== 'notify' && type !== 'append') ||
|
||||||
received.message?.protocolMessage ||
|
editedMessage ||
|
||||||
received.message?.pollUpdateMessage ||
|
received.message?.pollUpdateMessage ||
|
||||||
!received?.message
|
!received?.message
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user