downgrade baileys version

This commit is contained in:
Davidson Gomes 2024-05-20 19:39:56 -03:00
parent 8cc1b8daa8
commit 283b497788
16 changed files with 34 additions and 21 deletions

View File

@ -29,12 +29,12 @@ jobs:
- name: set docker tag
run: |
echo "DOCKER_TAG=ghcr.io/stack-app-br/evolution-api:$GIT_REF" >> $GITHUB_ENV
echo "DOCKER_TAG=ghcr.io/atendai/evolution-api:$GIT_REF" >> $GITHUB_ENV
- name: replace docker tag if main
if: github.ref_name == 'main'
run: |
echo "DOCKER_TAG=ghcr.io/stack-app-br/evolution-api:latest" >> $GITHUB_ENV
echo "DOCKER_TAG=ghcr.io/atendai/evolution-api:latest" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v3

View File

@ -49,7 +49,7 @@
"amqplib": "^0.10.3",
"@aws-sdk/client-sqs": "^3.569.0",
"axios": "^1.6.5",
"baileys": "^6.7.2",
"@whiskeysockets/baileys": "6.6.0",
"class-validator": "^0.14.1",
"compression": "^1.7.4",
"cors": "^2.8.5",

View File

@ -1,4 +1,4 @@
import { delay } from 'baileys';
import { delay } from '@whiskeysockets/baileys';
import { isURL } from 'class-validator';
import EventEmitter2 from 'eventemitter2';
import { v4 } from 'uuid';

View File

@ -1,4 +1,4 @@
import { proto, WAPresence, WAPrivacyOnlineValue, WAPrivacyValue, WAReadReceiptsValue } from 'baileys';
import { proto, WAPresence, WAPrivacyOnlineValue, WAPrivacyValue, WAReadReceiptsValue } from '@whiskeysockets/baileys';
export class OnWhatsAppDto {
constructor(

View File

@ -1,4 +1,4 @@
import { WAPresence } from 'baileys';
import { WAPresence } from '@whiskeysockets/baileys';
import { ProxyDto } from './proxy.dto';

View File

@ -1,4 +1,4 @@
import { proto, WAPresence } from 'baileys';
import { proto, WAPresence } from '@whiskeysockets/baileys';
export class Quoted {
key: proto.IMessageKey;

View File

@ -8,8 +8,8 @@ import ChatwootClient, {
inbox,
} from '@figuro/chatwoot-sdk';
import { request as chatwootRequest } from '@figuro/chatwoot-sdk/dist/core/request';
import { proto } from '@whiskeysockets/baileys';
import axios from 'axios';
import { proto } from 'baileys';
import FormData from 'form-data';
import { createReadStream, unlinkSync, writeFileSync } from 'fs';
import Jimp from 'jimp';

View File

@ -1,5 +1,5 @@
import { inbox } from '@figuro/chatwoot-sdk';
import { proto } from 'baileys';
import { proto } from '@whiskeysockets/baileys';
import { InstanceDto } from '../../../../api/dto/instance.dto';
import { ChatwootRaw, ContactRaw, MessageRaw } from '../../../../api/models';

View File

@ -9,12 +9,12 @@ export class IntegrationRaw {
token?: string;
}
const sqsSchema = new Schema<IntegrationRaw>({
const integrationSchema = new Schema<IntegrationRaw>({
_id: { type: String, _id: true },
integration: { type: String, required: true },
number: { type: String, required: true },
token: { type: String, required: true },
});
export const IntegrationModel = dbserver?.model(IntegrationRaw.name, sqsSchema, 'integration');
export const IntegrationModel = dbserver?.model(IntegrationRaw.name, integrationSchema, 'integration');
export type IntegrationModel = typeof IntegrationModel;

View File

@ -1,4 +1,4 @@
import { BufferJSON } from 'baileys';
import { BufferJSON } from '@whiskeysockets/baileys';
import { Logger } from '../../config/logger.config';
import { ICache } from '../abstract/abstract.cache';

View File

@ -1,5 +1,5 @@
import { WASocket } from '@whiskeysockets/baileys';
import axios from 'axios';
import { WASocket } from 'baileys';
import { execSync } from 'child_process';
import { isURL } from 'class-validator';
import EventEmitter2 from 'eventemitter2';

View File

@ -1,6 +1,5 @@
import ffmpegPath from '@ffmpeg-installer/ffmpeg';
import { Boom } from '@hapi/boom';
import axios from 'axios';
import makeWASocket, {
AnyMessageContent,
BufferedEventData,
@ -36,9 +35,10 @@ import makeWASocket, {
WAMessageUpdate,
WAPresence,
WASocket,
} from 'baileys';
import { Label } from 'baileys/lib/Types/Label';
import { LabelAssociation } from 'baileys/lib/Types/LabelAssociation';
} from '@whiskeysockets/baileys';
import { Label } from '@whiskeysockets/baileys/lib/Types/Label';
import { LabelAssociation } from '@whiskeysockets/baileys/lib/Types/LabelAssociation';
import axios from 'axios';
import { exec } from 'child_process';
import { isBase64, isURL } from 'class-validator';
import EventEmitter2 from 'eventemitter2';

View File

@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-namespace */
import { AuthenticationState, WAConnectionState } from 'baileys';
import { AuthenticationState, WAConnectionState } from '@whiskeysockets/baileys';
export enum Events {
APPLICATION_STARTUP = 'application.startup',

View File

@ -1,4 +1,4 @@
import { BufferJSON } from 'baileys';
import { BufferJSON } from '@whiskeysockets/baileys';
import { RedisClientType } from 'redis';
import { ICache } from '../api/abstract/abstract.cache';

View File

@ -1,4 +1,11 @@
import { AuthenticationCreds, AuthenticationState, BufferJSON, initAuthCreds, proto, SignalDataTypeMap } from 'baileys';
import {
AuthenticationCreds,
AuthenticationState,
BufferJSON,
initAuthCreds,
proto,
SignalDataTypeMap,
} from '@whiskeysockets/baileys';
import { configService, Database } from '../config/env.config';
import { Logger } from '../config/logger.config';

View File

@ -1,4 +1,10 @@
import { AuthenticationCreds, AuthenticationState, initAuthCreds, proto, SignalDataTypeMap } from 'baileys';
import {
AuthenticationCreds,
AuthenticationState,
initAuthCreds,
proto,
SignalDataTypeMap,
} from '@whiskeysockets/baileys';
import { CacheService } from '../api/services/cache.service';
import { Logger } from '../config/logger.config';