mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 03:42:23 -06:00
chore: remove CONFIG_SESSION_PHONE_VERSION and update related code
- Removed the CONFIG_SESSION_PHONE_VERSION environment variable from the configuration and Docker files. - Updated the BaileysStartupService to directly fetch the latest WhatsApp Web version without relying on the removed environment variable. - Adjusted the index router to reflect the changes in the WhatsApp Web version retrieval.
This commit is contained in:
@@ -549,17 +549,18 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
this.logger.info(`Browser: ${browser}`);
|
||||
}
|
||||
|
||||
let version;
|
||||
let log;
|
||||
const baileysVersion = await fetchLatestWaWebVersion({});
|
||||
const version = baileysVersion.version;
|
||||
const log = `Baileys version: ${version.join('.')}`;
|
||||
|
||||
if (session.VERSION) {
|
||||
version = session.VERSION.split('.');
|
||||
log = `Baileys version env: ${version}`;
|
||||
} else {
|
||||
const baileysVersion = await fetchLatestWaWebVersion({});
|
||||
version = baileysVersion.version;
|
||||
log = `Baileys version: ${version}`;
|
||||
}
|
||||
// if (session.VERSION) {
|
||||
// version = session.VERSION.split('.');
|
||||
// log = `Baileys version env: ${version}`;
|
||||
// } else {
|
||||
// const baileysVersion = await fetchLatestWaWebVersion({});
|
||||
// version = baileysVersion.version;
|
||||
// log = `Baileys version: ${version}`;
|
||||
// }
|
||||
|
||||
this.logger.info(log);
|
||||
|
||||
|
||||
@@ -69,8 +69,7 @@ router
|
||||
clientName: process.env.DATABASE_CONNECTION_CLIENT_NAME,
|
||||
manager: !serverConfig.DISABLE_MANAGER ? `${req.protocol}://${req.get('host')}/manager` : undefined,
|
||||
documentation: `https://doc.evolution-api.com`,
|
||||
whatsappWebVersion:
|
||||
process.env.CONFIG_SESSION_PHONE_VERSION || (await fetchLatestWaWebVersion({})).version.join('.'),
|
||||
whatsappWebVersion: (await fetchLatestWaWebVersion({})).version.join('.'),
|
||||
});
|
||||
})
|
||||
.post('/verify-creds', authGuard['apikey'], async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user