feat: Update the cw message with the wpp time

This commit is contained in:
Judson Cairo 2024-09-27 13:56:52 -03:00
parent f9726863ef
commit f35f8dd7e0

View File

@ -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]);
}