mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2026-02-05 14:56:29 -06:00
Update chatwoot.service.ts
fix: message can be undefined
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user