mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-22 20:12:02 -06:00
fix: normalize event names in channel.service.ts
Normalized event names by replacing underscores with dots and converting to lowercase. This ensures consistent naming conventions and prevents potential issues with queue bindings.
This commit is contained in:
parent
1e320f7904
commit
c060d330de
@ -721,7 +721,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,
|
||||
@ -731,7 +733,7 @@ export class ChannelStartupService {
|
||||
},
|
||||
});
|
||||
|
||||
await amqp.bindQueue(queueName, exchangeName, event);
|
||||
await amqp.bindQueue(queueName, exchangeName, eventName);
|
||||
|
||||
const message = {
|
||||
event,
|
||||
|
Loading…
Reference in New Issue
Block a user