Update ESLint configuration, Dockerfile, and package dependencies; refactor bot trigger logic

- Updated ESLint configuration to use TypeScript project references and adjusted parser options.
- Modified Dockerfile to include OpenSSL in both builder and final stages.
- Changed `mime` package version from `^4.0.6` to `^3.0.0` in `package.json` and updated TypeScript ESLint packages to `^6.21.0`.
- Refactored `findBotByTrigger` function to remove unnecessary settings repository parameter.
- Adjusted bot trigger logic in multiple controller files to streamline function calls.
This commit is contained in:
Davidson Gomes
2025-01-09 12:57:21 -03:00
parent ca451bfacc
commit d598c4ed0b
13 changed files with 1671 additions and 2062 deletions

View File

@@ -271,7 +271,7 @@ export class BaileysStartupService extends ChannelStartupService {
public async getProfileStatus() {
const status = await this.client.fetchStatus(this.instance.wuid);
return status?.status;
return status[0]?.status;
}
public get profilePictureUrl() {
@@ -974,7 +974,7 @@ export class BaileysStartupService extends ChannelStartupService {
const messagesRaw: any[] = [];
const messagesRepository = new Set(
const messagesRepository: Set<string> = new Set(
chatwootImport.getRepositoryMessagesCache(instance) ??
(
await this.prismaRepository.message.findMany({
@@ -1790,7 +1790,7 @@ export class BaileysStartupService extends ChannelStartupService {
try {
return {
wuid: jid,
status: (await this.client.fetchStatus(jid))?.status,
status: (await this.client.fetchStatus(jid))[0]?.status,
};
} catch (error) {
return {