Skip to content

Commit cd800f2

Browse files
committed
Merge branch 'release/2.3.7'
2 parents df20c5f + 4f642e1 commit cd800f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2955
-1795
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ body:
5959
value: |
6060
- OS: [e.g. Ubuntu 20.04, Windows 10, macOS 12.0]
6161
- Node.js version: [e.g. 18.17.0]
62-
- Evolution API version: [e.g. 2.3.6]
62+
- Evolution API version: [e.g. 2.3.7]
6363
- Database: [e.g. PostgreSQL 14, MySQL 8.0]
6464
- Connection type: [e.g. Baileys, WhatsApp Business API]
6565
validations:

CHANGELOG.md

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,154 @@
1+
# 2.3.7 (2025-12-05)
2+
3+
### Features
4+
5+
* **WhatsApp Business Meta Templates**: Add update and delete endpoints for Meta templates
6+
- New endpoints to edit and delete WhatsApp Business templates
7+
- Added DTOs and validation schemas for template management
8+
- Enhanced template lifecycle management capabilities
9+
10+
* **Events API**: Add isLatest and progress to messages.set event
11+
- Allows consumers to know when history sync is complete (isLatest=true)
12+
- Track sync progress percentage through webhooks
13+
- Added extra field to EmitData type for additional payload properties
14+
- Updated all event controllers (webhook, rabbitmq, sqs, websocket, pusher, kafka, nats)
15+
16+
* **N8N Integration**: Add quotedMessage to payload in sendMessageToBot
17+
- Support for quoted messages in N8N chatbot integration
18+
- Enhanced message context information
19+
20+
* **WebSocket**: Add wildcard "*" to allow all hosts to connect via websocket
21+
- More flexible host configuration for WebSocket connections
22+
- Improved host validation logic in WebsocketController
23+
24+
* **Pix Support**: Handle interactive button message for pix
25+
- Support for interactive Pix button messages
26+
- Enhanced payment flow integration
27+
28+
### Fixed
29+
30+
* **Baileys Message Processor**: Fix incoming message events not working after reconnection
31+
- Added cleanup logic in mount() to prevent memory leaks from multiple subscriptions
32+
- Recreate messageSubject if it was completed during logout
33+
- Remount messageProcessor in connectToWhatsapp() to ensure subscription is active
34+
- Fixed issue where onDestroy() calls complete() on RxJS Subject, making it permanently closed
35+
- Ensures old subscriptions are properly cleaned up before creating new ones
36+
37+
* **Baileys Authentication**: Resolve "waiting for message" state after reconnection
38+
- Fixed Redis keys not being properly removed during instance logout
39+
- Prevented loading of old/invalid cryptographic keys on reconnection
40+
- Fixed blocking state where instances authenticate but cannot send messages
41+
- Ensures new credentials (creds) are properly used after reconnection
42+
43+
* **OnWhatsapp Cache**: Prevent unique constraint errors and optimize database writes
44+
- Fixed `Unique constraint failed on the fields: (remoteJid)` error when sending to groups
45+
- Refactored query to use OR condition finding by jidOptions or remoteJid
46+
- Added deep comparison to skip unnecessary database updates
47+
- Replaced sequential processing with Promise.allSettled for parallel execution
48+
- Sorted JIDs alphabetically in jidOptions for accurate change detection
49+
- Added normalizeJid helper function for cleaner code
50+
51+
* **Proxy Integration**: Fix "Media upload failed on all hosts" error when using proxy
52+
- Created makeProxyAgentUndici() for Undici-compatible proxy agents
53+
- Fixed compatibility with Node.js 18+ native fetch() implementation
54+
- Replaced traditional HttpsProxyAgent/SocksProxyAgent with Undici ProxyAgent
55+
- Maintained legacy makeProxyAgent() for Axios compatibility
56+
- Fixed protocol handling in makeProxyAgent to prevent undefined errors
57+
58+
* **WhatsApp Business API**: Fix base64, filename and caption handling
59+
- Corrected base64 media conversion in Business API
60+
- Fixed filename handling for document messages
61+
- Improved caption processing for media messages
62+
- Enhanced remoteJid validation and processing
63+
64+
* **Chat Service**: Fix fetchChats and message panel errors
65+
- Fixed cleanMessageData errors in Manager message panel
66+
- Improved chat fetching reliability
67+
- Enhanced message data sanitization
68+
69+
* **Contact Filtering**: Apply where filters correctly in findContacts endpoint
70+
- Fixed endpoint to process all where clause fields (id, remoteJid, pushName)
71+
- Previously only processed remoteJid field, ignoring other filters
72+
- Added remoteJid field to contactValidateSchema for proper validation
73+
- Maintained multi-tenant isolation with instanceId filtering
74+
- Allows filtering contacts by any supported field instead of returning all contacts
75+
76+
* **Chatwoot and Baileys Integration**: Multiple integration improvements
77+
- Enhanced code formatting and consistency
78+
- Fixed integration issues between Chatwoot and Baileys services
79+
- Improved message handling and delivery
80+
81+
* **Baileys Message Loss**: Prevent message loss from WhatsApp stub placeholders
82+
- Fixed messages being lost and not saved to database, especially for channels/newsletters (@lid)
83+
- Detects WhatsApp stubs through messageStubParameters containing 'Message absent from node'
84+
- Prevents adding stubs to duplicate message cache
85+
- Allows real message to be processed when it arrives after decryption
86+
- Maintains stub discard to avoid saving empty placeholders
87+
88+
* **Database Contacts**: Respect DATABASE_SAVE_DATA_CONTACTS in contact updates
89+
- Added missing conditional checks for DATABASE_SAVE_DATA_CONTACTS configuration
90+
- Fixed profile picture updates attempting to save when database save is disabled
91+
- Fixed unawaited promise in contacts.upsert handler
92+
93+
* **Prisma/PostgreSQL**: Add unique constraint to Chat model
94+
- Generated migration to add unique index on instanceId and remoteJid
95+
- Added deduplication step before creating index to prevent constraint violations
96+
- Prevents chat duplication in database
97+
98+
* **MinIO Upload**: Handle messageContextInfo in media upload to prevent MinIO errors
99+
- Prevents errors when uploading media with messageContextInfo metadata
100+
- Improved error handling for media storage operations
101+
102+
* **Typebot**: Fix message routing for @lid JIDs
103+
- Typebot now responds to messages from JIDs ending with @lid
104+
- Maintains complete JID for @lid instead of extracting only number
105+
- Fixed condition: `remoteJid.includes('@lid') ? remoteJid : remoteJid.split('@')[0]`
106+
- Handles both @s.whatsapp.net and @lid message formats
107+
108+
* **Message Filtering**: Unify remoteJid filtering using OR with remoteJidAlt
109+
- Improved message filtering with alternative JID support
110+
- Better handling of messages with different JID formats
111+
112+
* **@lid Integration**: Multiple fixes for @lid problems, message events and chatwoot errors
113+
- Reorganized imports and improved message handling in BaileysStartupService
114+
- Enhanced remoteJid processing to handle @lid cases
115+
- Improved jid normalization and type safety in Chatwoot integration
116+
- Streamlined message handling logic and cache management
117+
- Refactored message handling and polling updates with decryption logic for poll votes
118+
- Improved event processing flow for various message types
119+
120+
* **Chatwoot Contacts**: Fix contact duplication error on import
121+
- Resolved 'ON CONFLICT DO UPDATE command cannot affect row a second time' error
122+
- Removed attempt to update identifier field in conflict (part of constraint)
123+
- Changed to update only updated_at field: `updated_at = NOW()`
124+
- Allows duplicate contacts to be updated correctly without errors
125+
126+
* **Chatwoot Service**: Fix async handling in update_last_seen method
127+
- Added missing await for chatwootRequest in read message processing
128+
- Prevents service failure when processing read messages
129+
130+
* **Metrics Access**: Fix IP validation including x-forwarded-for
131+
- Uses all IPs including x-forwarded-for header when checking metrics access
132+
- Improved security and access control for metrics endpoint
133+
134+
### Dependencies
135+
136+
* **Baileys**: Updated to version 7.0.0-rc.9
137+
- Latest release candidate with multiple improvements and bug fixes
138+
139+
* **AWS SDK**: Updated packages to version 3.936.0
140+
- Enhanced functionality and compatibility
141+
- Performance improvements
142+
143+
### Code Quality & Refactoring
144+
145+
* **Template Management**: Remove unused template edit/delete DTOs after refactoring
146+
* **Proxy Utilities**: Improve makeProxyAgent for Undici compatibility
147+
* **Code Formatting**: Enhance code formatting and consistency across services
148+
* **BaileysStartupService**: Fix indentation and remove unnecessary blank lines
149+
* **Event Controllers**: Guard extra spread and prevent core field override in all event controllers
150+
* **Import Organization**: Reorganize imports for better code structure and maintainability
151+
1152
# 2.3.6 (2025-10-21)
2153

3154
### Features

Docker/swarm/evolution_api_v2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3.7"
22

33
services:
44
evolution_v2:
5-
image: evoapicloud/evolution-api:v2.3.6
5+
image: evoapicloud/evolution-api:v2.3.7
66
volumes:
77
- evolution_instances:/evolution/instances
88
networks:

0 commit comments

Comments
 (0)