mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-20 02:06:43 -06:00
Update chatwoot.service.ts
fix: message can be undefined
This commit is contained in:
parent
3545b80050
commit
244fe0835e
@ -1204,9 +1204,10 @@ export class ChatwootService {
|
||||
}
|
||||
|
||||
private updateChatwootMessageId(message: MessageRaw, chatwootMessageId: string, instance: InstanceDto) {
|
||||
if (!chatwootMessageId) {
|
||||
if (!chatwootMessageId || !message?.key?.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
message.chatwootMessageId = chatwootMessageId;
|
||||
this.repository.message.update([message], instance.instanceName, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user