mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2026-01-12 14:52:24 -06:00
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.
This commit is contained in:
@@ -43,6 +43,7 @@ export const instanceSchema: JSONSchema7 = {
|
||||
readMessages: { type: 'boolean' },
|
||||
readStatus: { type: 'boolean' },
|
||||
syncFullHistory: { type: 'boolean' },
|
||||
wavoipToken: { type: 'string' },
|
||||
// Proxy
|
||||
proxyHost: { type: 'string' },
|
||||
proxyPort: { type: 'string' },
|
||||
|
||||
@@ -31,7 +31,24 @@ export const settingsSchema: JSONSchema7 = {
|
||||
readMessages: { type: 'boolean' },
|
||||
readStatus: { type: 'boolean' },
|
||||
syncFullHistory: { type: 'boolean' },
|
||||
wavoipToken: { type: 'string' },
|
||||
},
|
||||
required: ['rejectCall', 'groupsIgnore', 'alwaysOnline', 'readMessages', 'readStatus', 'syncFullHistory'],
|
||||
...isNotEmpty('rejectCall', 'groupsIgnore', 'alwaysOnline', 'readMessages', 'readStatus', 'syncFullHistory'),
|
||||
required: [
|
||||
'rejectCall',
|
||||
'groupsIgnore',
|
||||
'alwaysOnline',
|
||||
'readMessages',
|
||||
'readStatus',
|
||||
'syncFullHistory',
|
||||
'wavoipToken',
|
||||
],
|
||||
...isNotEmpty(
|
||||
'rejectCall',
|
||||
'groupsIgnore',
|
||||
'alwaysOnline',
|
||||
'readMessages',
|
||||
'readStatus',
|
||||
'syncFullHistory',
|
||||
'wavoipToken',
|
||||
),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user