mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2026-01-13 23:32:22 -06:00
refactor: update TypeScript build process and dependencies
- Changed the build command in package.json to use TypeScript compiler (tsc) with noEmit option. - Added @swc/core and @swc/helpers as development dependencies for improved performance. refactor: clean up WhatsApp Baileys service - Removed unused properties and interfaces related to message keys. - Simplified message handling logic by removing redundant checks and conditions. - Updated message timestamp handling for consistency. - Improved readability and maintainability by restructuring code and removing commented-out sections. refactor: optimize Chatwoot service - Streamlined database queries by reusing PostgreSQL client connection. - Enhanced conversation creation logic with better cache handling. - Removed unnecessary methods and improved existing ones for clarity. - Updated message sending logic to handle file streams instead of buffers. fix: improve translation loading mechanism - Simplified translation file loading by removing environment variable checks. - Ensured translations are loaded from a consistent path within the project structure.
This commit is contained in:
@@ -112,12 +112,19 @@ class ChatwootImport {
|
||||
const bindInsert = [provider.accountId];
|
||||
|
||||
for (const contact of contactsChunk) {
|
||||
bindInsert.push(contact.pushName);
|
||||
const isGroup = this.isIgnorePhoneNumber(contact.remoteJid);
|
||||
|
||||
const contactName = isGroup ? `${contact.pushName} (GROUP)` : contact.pushName;
|
||||
bindInsert.push(contactName);
|
||||
const bindName = `$${bindInsert.length}`;
|
||||
|
||||
bindInsert.push(`+${contact.remoteJid.split('@')[0]}`);
|
||||
const bindPhoneNumber = `$${bindInsert.length}`;
|
||||
|
||||
let bindPhoneNumber: string;
|
||||
if (!isGroup) {
|
||||
bindInsert.push(`+${contact.remoteJid.split('@')[0]}`);
|
||||
bindPhoneNumber = `$${bindInsert.length}`;
|
||||
} else {
|
||||
bindPhoneNumber = 'NULL';
|
||||
}
|
||||
bindInsert.push(contact.remoteJid);
|
||||
const bindIdentifier = `$${bindInsert.length}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user