diff --git a/package.json b/package.json index 37b58b4a7..c3c44d4aa 100644 --- a/package.json +++ b/package.json @@ -75,8 +75,6 @@ "join": "^3.0.0", "js-yaml": "^4.1.0", "jsonschema": "^1.4.1", - "jsonwebtoken": "^9.0.2", - "libphonenumber-js": "^1.10.39", "link-preview-js": "^3.0.4", "node-cache": "^5.1.2", "node-mime-types": "^1.1.0", @@ -100,7 +98,6 @@ "@types/cors": "^2.8.13", "@types/express": "^4.17.17", "@types/js-yaml": "^4.0.5", - "@types/jsonwebtoken": "^8.5.9", "@types/mime-types": "^2.1.1", "@types/node": "^18.15.11", "@types/node-windows": "^0.1.2", diff --git a/src/api/services/channel.service.ts b/src/api/services/channel.service.ts index 87527818f..07e157864 100644 --- a/src/api/services/channel.service.ts +++ b/src/api/services/channel.service.ts @@ -591,7 +591,9 @@ export class ChannelStartupService { autoDelete: false, }); - const queueName = `${this.instanceName}.${event}`; + const eventName = event.replace(/_/g, '.').toLowerCase(); + + const queueName = `${this.instanceName}.${eventName}`; await amqp.assertQueue(queueName, { durable: true, @@ -601,7 +603,7 @@ export class ChannelStartupService { }, }); - await amqp.bindQueue(queueName, exchangeName, event); + await amqp.bindQueue(queueName, exchangeName, eventName); const message = { event, diff --git a/src/api/services/channels/whatsapp.baileys.service.ts b/src/api/services/channels/whatsapp.baileys.service.ts index fa9ea4e62..673e24034 100644 --- a/src/api/services/channels/whatsapp.baileys.service.ts +++ b/src/api/services/channels/whatsapp.baileys.service.ts @@ -1514,7 +1514,7 @@ export class BaileysStartupService extends ChannelStartupService { if (events['presence.update']) { const payload = events['presence.update']; - if (settings.groupsIgnore && payload.id.includes('@g.us')) { + if (settings?.groupsIgnore && payload.id.includes('@g.us')) { return; } this.sendDataWebhook(Events.PRESENCE_UPDATE, payload);