Commit Graph

17 Commits

Author SHA1 Message Date
Davidson Gomes
de11e6f9ca fix(websocket): improve host validation logic in WebsocketController 2025-12-05 11:03:52 -03:00
Davidson Gomes
86b194af5f Merge pull request #2260 from alexandrereyes/feat/add-islatest-progress-to-messages-set
feat(events): add isLatest and progress to messages.set event
2025-12-05 11:01:21 -03:00
micaelmz
abd0351f8f feat: add wildcard "*" to allow all hosts to connect via websocket 2025-12-02 18:01:19 -03:00
Alexandre Martins
930d32df3a fix(events): guard extra spread and prevent core field override
- Use (extra ?? {}) to handle undefined extra safely
- Spread extra first to prevent overriding core fields like event, instance, data
- Applied fix to all 7 event controllers

Addresses Sourcery AI review feedback.
2025-11-26 15:48:53 -03:00
Alexandre Martins
fa6b5c28a6 feat(events): add isLatest and progress to messages.set event
- Add extra field to EmitData type for additional payload properties
- Update EventManager and sendDataWebhook to support extra parameters
- Update all event controllers (webhook, rabbitmq, sqs, websocket, pusher, kafka, nats) to include extra fields in payload
- Pass isLatest and progress from Baileys messaging-history.set to messages.set webhook

This allows consumers to know when the history sync is complete (isLatest=true) and track sync progress percentage.
2025-11-26 15:44:18 -03:00
Davidson Gomes
3ddbd6a7fb feat(config): add telemetry and metrics configuration options
- Introduce new environment variables for telemetry and Prometheus metrics in .env.example
- Create example configuration files for Prometheus and Grafana dashboards
- Update main application to utilize new configuration settings for Sentry, audio converter, and proxy
- Enhance channel services to support audio conversion API integration
- Implement middleware for metrics IP whitelisting and basic authentication in routes
2025-09-17 16:50:36 -03:00
moothz
d67eb3202b Fix lint 2025-09-09 15:46:26 -03:00
moothz
0aa6c96765 Customizable Websockets Security
Enables the option to specify safe remote addresses using WEBSOCKET_ALLOWED_HOSTS enviroment variables. Defaults to the secure only localhost.
2025-09-09 14:56:11 -03:00
Felipe Augusto Rieck
fb11f3f99c Code quality 2025-08-04 18:19:14 -03:00
Felipe Augusto Rieck
d4eb61f64d Improving localhost check 2025-08-04 18:14:33 -03:00
Felipe Augusto Rieck
4f043f9576 Securing websockets 2025-08-04 16:34:20 -03:00
Davidson Gomes
32cde710b8 feat: Enhance WebSocket authentication and connection handling
- Add robust authentication mechanism for WebSocket connections
- Implement API key validation for both instance-specific and global tokens
- Improve connection request handling with detailed logging
- Refactor WebSocket controller to support more secure connection validation
2025-03-06 09:17:43 -03:00
Davidson Gomes
540467293c Enhance settings and integrate Baileys controller for WhatsApp functionality
- Added `wavoipToken` field to `Setting` model in both MySQL and PostgreSQL schemas.
- Updated `package.json` and `package-lock.json` to include `mime-types` and `socket.io-client` dependencies.
- Introduced `BaileysController` and `BaileysRouter` for handling WhatsApp interactions.
- Refactored media type handling to use `mime-types` instead of `mime` across various services.
- Updated DTOs and validation schemas to accommodate the new `wavoipToken` field.
- Implemented voice call functionalities using the Wavoip service in the Baileys integration.
- Enhanced event handling in the WebSocket controller to support new features.
2025-01-16 11:58:33 -03:00
Davidson Gomes
f0840e07fe changelog 2024-08-30 11:38:41 -03:00
Davidson Gomes
5d6a34ad3f fix: websocket emit 2024-08-23 16:57:44 -03:00
Davidson Gomes
6a62ae85fc refactor: integration folders and fix manager bugs 2024-08-23 13:46:51 -03:00
Stênio Aníbal
05ee65f422 Simplify events structure and fix minor issues 2024-08-23 10:53:31 -03:00