From f35f8dd7e031733a97134edff98d1b8b09a4384b Mon Sep 17 00:00:00 2001 From: Judson Cairo Date: Fri, 27 Sep 2024 13:56:52 -0300 Subject: [PATCH] feat: Update the cw message with the wpp time --- .../chatbot/chatwoot/utils/chatwoot-import-helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/integrations/chatbot/chatwoot/utils/chatwoot-import-helper.ts b/src/api/integrations/chatbot/chatwoot/utils/chatwoot-import-helper.ts index a486eab0..f162f4c4 100644 --- a/src/api/integrations/chatbot/chatwoot/utils/chatwoot-import-helper.ts +++ b/src/api/integrations/chatbot/chatwoot/utils/chatwoot-import-helper.ts @@ -546,7 +546,7 @@ class ChatwootImport { public updateMessageSourceID(messageId: string | number, sourceId: string) { const pgClient = postgresClient.getChatwootConnection(); - const sql = `UPDATE messages SET source_id = $1, status = 0 WHERE id = $2;`; + const sql = `UPDATE messages SET source_id = $1, status = 0, created_at = NOW(), updated_at = NOW() WHERE id = $2;`; return pgClient.query(sql, [`WAID:${sourceId}`, messageId]); }