mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 12:12:55 -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
|
const formattedSourceIds = sourceIds.map((sourceId) => `WAID:${sourceId.replace('WAID:', '')}`); // Make sure the sourceId is always formatted as WAID:1234567890
|
||||||
let query: string;
|
let query: string;
|
||||||
if (conversationId) {
|
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) {
|
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();
|
const pgClient = postgresClient.getChatwootConnection();
|
||||||
|
Loading…
Reference in New Issue
Block a user