diff --git a/src/api/routes/index.router.ts b/src/api/routes/index.router.ts index 506fe777..4f7395e9 100644 --- a/src/api/routes/index.router.ts +++ b/src/api/routes/index.router.ts @@ -49,7 +49,7 @@ if (!serverConfig.DISABLE_MANAGER) router.use('/manager', new ViewsRouter().rout router.get('/assets/*', (req, res) => { const fileName = req.params[0]; - const basePath = path.join(__dirname, '../../../manager/dist'); + const basePath = path.join(process.cwd(), 'manager', 'dist'); const filePath = path.join(basePath, 'assets/', fileName); diff --git a/src/api/routes/view.router.ts b/src/api/routes/view.router.ts index 14e72a64..8e8fc849 100644 --- a/src/api/routes/view.router.ts +++ b/src/api/routes/view.router.ts @@ -10,7 +10,7 @@ export class ViewsRouter extends RouterBroker { super(); this.router = Router(); - const basePath = path.join(__dirname, '../../../manager/dist'); + const basePath = path.join(process.cwd(), 'manager', 'dist'); const indexPath = path.join(basePath, 'index.html'); console.log('Base path:', basePath); diff --git a/src/api/services/channels/whatsapp.baileys.service.ts b/src/api/services/channels/whatsapp.baileys.service.ts index 983de7e4..1a7194b0 100644 --- a/src/api/services/channels/whatsapp.baileys.service.ts +++ b/src/api/services/channels/whatsapp.baileys.service.ts @@ -22,7 +22,6 @@ import makeWASocket, { GroupParticipant, isJidBroadcast, isJidGroup, - isJidNewsletter, isJidUser, makeCacheableSignalKeyStore, MessageUpsertType, @@ -622,7 +621,7 @@ export class BaileysStartupService extends ChannelStartupService { shouldIgnoreJid: (jid) => { const isGroupJid = this.localSettings.groupsIgnore && isJidGroup(jid); const isBroadcast = !this.localSettings.readStatus && isJidBroadcast(jid); - const isNewsletter = isJidNewsletter(jid); + const isNewsletter = jid.includes('newsletter'); return isGroupJid || isBroadcast || isNewsletter; },