mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00
commit
0239638232
@ -180,11 +180,10 @@ class ChatwootImport {
|
||||
const formattedSourceIds = sourceIds.map((sourceId) => `WAID:${sourceId.replace('WAID:', '')}`); // Make sure the sourceId is always formatted as WAID:1234567890
|
||||
let query: string;
|
||||
if (conversationId) {
|
||||
query = 'SELECT source_id FROM messages WHERE source_id = ANY($1)';
|
||||
}
|
||||
query = 'SELECT source_id FROM messages WHERE source_id = ANY($1) AND conversation_id = $2';
|
||||
|
||||
if (!conversationId) {
|
||||
query = 'SELECT source_id FROM messages WHERE source_id = ANY($1) AND conversation_id = $2';
|
||||
query = 'SELECT source_id FROM messages WHERE source_id = ANY($1)';
|
||||
}
|
||||
|
||||
const pgClient = postgresClient.getChatwootConnection();
|
||||
|
Loading…
Reference in New Issue
Block a user