mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-20 10:16: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) {
|
private updateChatwootMessageId(message: MessageRaw, chatwootMessageId: string, instance: InstanceDto) {
|
||||||
if (!chatwootMessageId) {
|
if (!chatwootMessageId || !message?.key?.id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
message.chatwootMessageId = chatwootMessageId;
|
message.chatwootMessageId = chatwootMessageId;
|
||||||
this.repository.message.update([message], instance.instanceName, true);
|
this.repository.message.update([message], instance.instanceName, true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user