mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-22 20:12:02 -06:00
lint_changes
This commit is contained in:
parent
98b245c7a3
commit
8ab198fe9e
@ -181,13 +181,13 @@ WEBHOOK_EVENTS_ERRORS=false
|
||||
WEBHOOK_EVENTS_ERRORS_WEBHOOK=
|
||||
|
||||
# Name that will be displayed on smartphone connection
|
||||
CONFIG_SESSION_PHONE_CLIENT=Evolution API
|
||||
CONFIG_SESSION_PHONE_CLIENT='Whizapp'
|
||||
# Browser Name = Chrome | Firefox | Edge | Opera | Safari
|
||||
CONFIG_SESSION_PHONE_NAME=Chrome
|
||||
|
||||
# Whatsapp Web version for baileys channel
|
||||
# https://web.whatsapp.com/check-update?version=0&platform=web
|
||||
CONFIG_SESSION_PHONE_VERSION=2.3000.1015901307
|
||||
CONFIG_SESSION_PHONE_VERSION=2.3000.1023005435
|
||||
|
||||
# Set qrcode display limit
|
||||
QRCODE_LIMIT=30
|
||||
@ -220,7 +220,7 @@ DIFY_ENABLED=false
|
||||
# Cache - Environment variables
|
||||
# Redis Cache enabled
|
||||
CACHE_REDIS_ENABLED=true
|
||||
CACHE_REDIS_URI=redis://localhost:6379/6
|
||||
CACHE_REDIS_URI=redis://redis:6379/6
|
||||
CACHE_REDIS_TTL=604800
|
||||
# Prefix serves to differentiate data from one installation to another that are using the same redis
|
||||
CACHE_REDIS_PREFIX_KEY=evolution
|
||||
|
@ -2,7 +2,7 @@ services:
|
||||
api:
|
||||
container_name: evolution_api_${ENVIROMNENT}
|
||||
build: .
|
||||
image: adaptweb/evolution-api:1.3.0
|
||||
image: adaptweb/evolution-api:1.5.0
|
||||
restart: always
|
||||
depends_on:
|
||||
- redis
|
||||
|
@ -383,7 +383,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
qrcodeTerminal.generate(qr, { small: true }, (qrcode) =>
|
||||
this.logger.log(
|
||||
`\n{ instance: ${this.instance.name} pairingCode: ${this.instance.qrcode.pairingCode}, qrcodeCount: ${this.instance.qrcode.count} }\n` +
|
||||
qrcode,
|
||||
qrcode,
|
||||
),
|
||||
);
|
||||
|
||||
@ -1024,18 +1024,18 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
|
||||
const messagesRepository: Set<string> = new Set(
|
||||
chatwootImport.getRepositoryMessagesCache(instance) ??
|
||||
(
|
||||
await this.prismaRepository.message.findMany({
|
||||
select: { key: true },
|
||||
where: { instanceId: this.instanceId },
|
||||
})
|
||||
).map((message) => {
|
||||
const key = message.key as {
|
||||
id: string;
|
||||
};
|
||||
(
|
||||
await this.prismaRepository.message.findMany({
|
||||
select: { key: true },
|
||||
where: { instanceId: this.instanceId },
|
||||
})
|
||||
).map((message) => {
|
||||
const key = message.key as {
|
||||
id: string;
|
||||
};
|
||||
|
||||
return key.id;
|
||||
}),
|
||||
return key.id;
|
||||
}),
|
||||
);
|
||||
|
||||
if (chatwootImport.getRepositoryMessagesCache(instance) === null) {
|
||||
@ -1653,10 +1653,12 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
|
||||
private readonly groupHandler = {
|
||||
'groups.upsert': (groupMetadata: GroupMetadata[]) => {
|
||||
console.dir(groupMetadata, { depth: null });
|
||||
this.sendDataWebhook(Events.GROUPS_UPSERT, groupMetadata);
|
||||
},
|
||||
|
||||
'groups.update': (groupMetadataUpdate: Partial<GroupMetadata>[]) => {
|
||||
console.dir(groupMetadataUpdate, { depth: null });
|
||||
this.sendDataWebhook(Events.GROUPS_UPDATE, groupMetadataUpdate);
|
||||
|
||||
groupMetadataUpdate.forEach((group) => {
|
||||
@ -1671,6 +1673,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
participants: string[];
|
||||
action: ParticipantAction;
|
||||
}) => {
|
||||
console.dir(participantsUpdate, { depth: null })
|
||||
this.sendDataWebhook(Events.GROUP_PARTICIPANTS_UPDATE, participantsUpdate);
|
||||
|
||||
this.updateGroupMetadataCache(participantsUpdate.id);
|
||||
|
4
src/cache/rediscache.client.ts
vendored
4
src/cache/rediscache.client.ts
vendored
@ -30,7 +30,7 @@ class Redis {
|
||||
});
|
||||
|
||||
this.client.on('error', () => {
|
||||
this.logger.error('redis disconnected');
|
||||
this.logger.error(`redis disconnected, URI:${this.conf.URI}`);
|
||||
this.connected = false;
|
||||
});
|
||||
|
||||
@ -40,7 +40,7 @@ class Redis {
|
||||
});
|
||||
|
||||
try {
|
||||
this.client.connect();
|
||||
this.client.connect().then(()=> {this.logger.verbose("Attempting redis connection")});
|
||||
this.connected = true;
|
||||
} catch (e) {
|
||||
this.connected = false;
|
||||
|
@ -152,11 +152,10 @@ async function bootstrap() {
|
||||
logger.info('Server closed, exiting...');
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
logger.error('Could not close connections in time, forcefully exiting');
|
||||
process.exit(1);
|
||||
}, 30000);
|
||||
}, 60000);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user