Skip to content

Commit 78c7b96

Browse files
committed
Merge branch 'release/2.3.4'
2 parents 4726c47 + dfea584 commit 78c7b96

Some content is hidden

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

46 files changed

+2188
-639
lines changed

.env.example

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,60 @@ PUSHER_EVENTS_CALL=true
190190
PUSHER_EVENTS_TYPEBOT_START=false
191191
PUSHER_EVENTS_TYPEBOT_CHANGE_STATUS=false
192192

193+
# Kafka - Environment variables
194+
KAFKA_ENABLED=false
195+
KAFKA_CLIENT_ID=evolution-api
196+
KAFKA_BROKERS=localhost:9092
197+
KAFKA_CONNECTION_TIMEOUT=3000
198+
KAFKA_REQUEST_TIMEOUT=30000
199+
# Global events - By enabling this variable, events from all instances are sent to global Kafka topics.
200+
KAFKA_GLOBAL_ENABLED=false
201+
KAFKA_CONSUMER_GROUP_ID=evolution-api-consumers
202+
KAFKA_TOPIC_PREFIX=evolution
203+
KAFKA_NUM_PARTITIONS=1
204+
KAFKA_REPLICATION_FACTOR=1
205+
KAFKA_AUTO_CREATE_TOPICS=false
206+
# Choose the events you want to send to Kafka
207+
KAFKA_EVENTS_APPLICATION_STARTUP=false
208+
KAFKA_EVENTS_INSTANCE_CREATE=false
209+
KAFKA_EVENTS_INSTANCE_DELETE=false
210+
KAFKA_EVENTS_QRCODE_UPDATED=false
211+
KAFKA_EVENTS_MESSAGES_SET=false
212+
KAFKA_EVENTS_MESSAGES_UPSERT=false
213+
KAFKA_EVENTS_MESSAGES_EDITED=false
214+
KAFKA_EVENTS_MESSAGES_UPDATE=false
215+
KAFKA_EVENTS_MESSAGES_DELETE=false
216+
KAFKA_EVENTS_SEND_MESSAGE=false
217+
KAFKA_EVENTS_SEND_MESSAGE_UPDATE=false
218+
KAFKA_EVENTS_CONTACTS_SET=false
219+
KAFKA_EVENTS_CONTACTS_UPSERT=false
220+
KAFKA_EVENTS_CONTACTS_UPDATE=false
221+
KAFKA_EVENTS_PRESENCE_UPDATE=false
222+
KAFKA_EVENTS_CHATS_SET=false
223+
KAFKA_EVENTS_CHATS_UPSERT=false
224+
KAFKA_EVENTS_CHATS_UPDATE=false
225+
KAFKA_EVENTS_CHATS_DELETE=false
226+
KAFKA_EVENTS_GROUPS_UPSERT=false
227+
KAFKA_EVENTS_GROUPS_UPDATE=false
228+
KAFKA_EVENTS_GROUP_PARTICIPANTS_UPDATE=false
229+
KAFKA_EVENTS_CONNECTION_UPDATE=false
230+
KAFKA_EVENTS_LABELS_EDIT=false
231+
KAFKA_EVENTS_LABELS_ASSOCIATION=false
232+
KAFKA_EVENTS_CALL=false
233+
KAFKA_EVENTS_TYPEBOT_START=false
234+
KAFKA_EVENTS_TYPEBOT_CHANGE_STATUS=false
235+
# SASL Authentication (optional)
236+
KAFKA_SASL_ENABLED=false
237+
KAFKA_SASL_MECHANISM=plain
238+
KAFKA_SASL_USERNAME=
239+
KAFKA_SASL_PASSWORD=
240+
# SSL Configuration (optional)
241+
KAFKA_SSL_ENABLED=false
242+
KAFKA_SSL_REJECT_UNAUTHORIZED=true
243+
KAFKA_SSL_CA=
244+
KAFKA_SSL_KEY=
245+
KAFKA_SSL_CERT=
246+
193247
# WhatsApp Business API - Environment variables
194248
# Token used to validate the webhook on the Facebook APP
195249
WA_BUSINESS_TOKEN_WEBHOOK=evolution

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = {
2626
'@typescript-eslint/no-explicit-any': 'off',
2727
'@typescript-eslint/no-empty-function': 'off',
2828
'@typescript-eslint/no-non-null-assertion': 'off',
29-
'@typescript-eslint/no-unused-vars': 'warn',
29+
'@typescript-eslint/no-unused-vars': 'error',
3030
'import/first': 'error',
3131
'import/no-duplicates': 'error',
3232
'simple-import-sort/imports': 'error',

.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.3]
62+
- Evolution API version: [e.g. 2.3.4]
6363
- Database: [e.g. PostgreSQL 14, MySQL 8.0]
6464
- Connection type: [e.g. Baileys, WhatsApp Business API]
6565
validations:

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "evolution-manager-v2"]
2+
path = evolution-manager-v2
3+
url = https://github.com/EvolutionAPI/evolution-manager-v2.git

CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
1+
# 2.3.4 (2025-09-23)
2+
3+
### Features
4+
5+
* **Kafka Integration**: Added Apache Kafka event integration for real-time event streaming
6+
- New Kafka controller, router, and schema for event publishing
7+
- Support for instance-specific and global event topics
8+
- Configurable SASL/SSL authentication and connection settings
9+
- Auto-creation of topics with configurable partitions and replication
10+
- Consumer group management for reliable event processing
11+
- Integration with existing event manager for seamless event distribution
12+
13+
* **Evolution Manager v2 Open Source**: Evolution Manager v2 is now available as open source
14+
- Added as git submodule with HTTPS URL for easy access
15+
- Complete open source setup with Apache 2.0 license + Evolution API custom conditions
16+
- GitHub templates for issues, pull requests, and workflows
17+
- Comprehensive documentation and contribution guidelines
18+
- Docker support for development and production environments
19+
- CI/CD workflows for code quality, security audits, and automated builds
20+
- Multi-language support (English, Portuguese, Spanish, French)
21+
- Modern React + TypeScript + Vite frontend with Tailwind CSS
22+
23+
* **EvolutionBot Enhancements**: Improved EvolutionBot functionality and message handling
24+
- Implemented splitMessages functionality for better message segmentation
25+
- Added linkPreview support for enhanced message presentation
26+
- Centralized split logic across chatbot services for consistency
27+
- Enhanced message formatting and delivery capabilities
28+
29+
### Fixed
30+
31+
* **MySQL Schema**: Fixed invalid default value errors for `createdAt` fields in `Evoai` and `EvoaiSetting` models
32+
- Changed `@default(now())` to `@default(dbgenerated("CURRENT_TIMESTAMP"))` for MySQL compatibility
33+
- Added missing relation fields (`N8n`, `N8nSetting`, `Evoai`, `EvoaiSetting`) in Instance model
34+
- Resolved Prisma schema validation errors for MySQL provider
35+
36+
* **Prisma Schema Validation**: Fixed `instanceName` field error in message creation
37+
- Removed invalid `instanceName` field from message objects before database insertion
38+
- Resolved `Unknown argument 'instanceName'` Prisma validation error
39+
- Streamlined message data structure to match Prisma schema requirements
40+
41+
* **Media Message Processing**: Enhanced media handling across chatbot services
42+
- Fixed base64 conversion in EvoAI service for proper image processing
43+
- Converted ArrayBuffer to base64 string using `Buffer.from().toString('base64')`
44+
- Improved media URL handling and base64 encoding for better chatbot integration
45+
- Enhanced image message detection and processing workflow
46+
47+
* **Evolution Manager v2 Linting**: Resolved ESLint configuration conflicts
48+
- Disabled conflicting Prettier rules in ESLint configuration
49+
- Added comprehensive rule overrides for TypeScript and React patterns
50+
- Fixed import ordering and code formatting issues
51+
- Updated security vulnerabilities in dependencies (Vite, esbuild)
52+
53+
### Code Quality & Refactoring
54+
55+
* **Chatbot Services**: Streamlined media message handling across all chatbot integrations
56+
- Standardized base64 and mediaUrl processing patterns
57+
- Improved code readability and maintainability in media handling logic
58+
- Enhanced error handling for media download and conversion processes
59+
- Unified image message detection across different chatbot services
60+
61+
* **Database Operations**: Improved data consistency and validation
62+
- Enhanced Prisma schema compliance across all message operations
63+
- Removed redundant instance name references for better data integrity
64+
- Optimized message creation workflow with proper field validation
65+
66+
### Environment Variables
67+
68+
* Added comprehensive Kafka configuration options:
69+
- `KAFKA_ENABLED`, `KAFKA_CLIENT_ID`, `KAFKA_BROKERS`
70+
- `KAFKA_CONSUMER_GROUP_ID`, `KAFKA_TOPIC_PREFIX`
71+
- `KAFKA_SASL_*` and `KAFKA_SSL_*` for authentication
72+
- `KAFKA_EVENTS_*` for event type configuration
73+
174
# 2.3.3 (2025-09-18)
275

376
### Features

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ b. Your contributed code may be used for commercial purposes, including but not
1717

1818
Apart from the specific conditions mentioned above, all other rights and restrictions follow the Apache License 2.0. Detailed information about the Apache License 2.0 can be found at http://www.apache.org/licenses/LICENSE-2.0.
1919

20-
© 2024 Evolution API
20+
© 2025 Evolution API
2121

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ Evolution API supports various integrations to enhance its functionality. Below
5555
- [RabbitMQ](https://www.rabbitmq.com/):
5656
- Receive events from the Evolution API via RabbitMQ.
5757

58+
- [Apache Kafka](https://kafka.apache.org/):
59+
- Receive events from the Evolution API via Apache Kafka for real-time event streaming and processing.
60+
5861
- [Amazon SQS](https://aws.amazon.com/pt/sqs/):
5962
- Receive events from the Evolution API via Amazon SQS.
6063

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: "3.8"
33
services:
44
api:
55
container_name: evolution_api
6-
image: evolution/api:metrics
6+
image: evoapicloud/evolution-api:latest
77
restart: always
88
depends_on:
99
- redis

0 commit comments

Comments
 (0)