mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 04:02:54 -06:00
test
This commit is contained in:
parent
bd09328ec2
commit
a81f5953fc
@ -67,11 +67,11 @@ export const initQueues = (instanceName: string, events: string[]) => {
|
||||
const amqp = getAMQP();
|
||||
|
||||
const rabbitMode = rabbitConfig.MODE || 'isolated';
|
||||
const exchangeName = rabbitConfig.EXCHANGE_NAME ?? 'evolution_exchange';
|
||||
let exchangeName = rabbitConfig.EXCHANGE_NAME ?? 'evolution_exchange';
|
||||
|
||||
const receivedEvents = events.map(parseEvtName);
|
||||
if (rabbitMode === 'isolated') {
|
||||
// exchangeName = instanceName ?? 'evolution_exchange';
|
||||
exchangeName = instanceName ?? 'evolution_exchange';
|
||||
|
||||
receivedEvents.forEach((event) => {
|
||||
amqp.assertExchange(exchangeName, 'topic', {
|
||||
@ -196,8 +196,8 @@ interface SendEventData {
|
||||
export const sendEventData = ({ data, event, wuid, apiKey, instanceName }: SendEventData) => {
|
||||
const rabbitConfig = configService.get<Rabbitmq>('RABBITMQ');
|
||||
const rabbitMode = rabbitConfig.MODE || 'isolated';
|
||||
const exchangeName = rabbitConfig.EXCHANGE_NAME ?? 'evolution_exchange';
|
||||
// if (rabbitMode === 'isolated') exchangeName = instanceName ?? 'evolution_exchange';
|
||||
let exchangeName = rabbitConfig.EXCHANGE_NAME ?? 'evolution_exchange';
|
||||
if (rabbitMode === 'isolated') exchangeName = instanceName ?? 'evolution_exchange';
|
||||
|
||||
console.log('exchangeName: ', exchangeName);
|
||||
console.log('rabbitMode: ', rabbitMode);
|
||||
|
@ -936,14 +936,9 @@ export class BaileysStartupService extends WAStartupService {
|
||||
) => {
|
||||
try {
|
||||
this.logger.verbose('Event received: messages.upsert');
|
||||
|
||||
const received = messages[0];
|
||||
|
||||
// for (const received of messages) {
|
||||
for (const received of messages) {
|
||||
if (
|
||||
// (type !== 'notify' && type !== 'append') ||
|
||||
type !== 'notify' ||
|
||||
!received?.message ||
|
||||
(type !== 'notify' && type !== 'append') ||
|
||||
received.message?.protocolMessage ||
|
||||
received.message?.pollUpdateMessage
|
||||
) {
|
||||
@ -1111,7 +1106,7 @@ export class BaileysStartupService extends WAStartupService {
|
||||
|
||||
this.logger.verbose('Inserting contact in database');
|
||||
this.repository.contact.insert([contactRaw], this.instance.name, database.SAVE_DATA.CONTACTS);
|
||||
// }
|
||||
}
|
||||
} catch (error) {
|
||||
this.logger.error(error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user