diff --git a/.github/workflows/publish_docker_image_v2.yml b/.github/workflows/publish_docker_image_v2.yml deleted file mode 100644 index 98221c33..00000000 --- a/.github/workflows/publish_docker_image_v2.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Build Docker image - -on: - push: - branches: - - v2.0.0 - -jobs: - build_deploy: - name: Build and Deploy - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: atendai/evolution-api - tags: v2.0.0-beta - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v5 - with: - platforms: linux/amd64,linux/arm64 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/src/api/integrations/typebot/services/typebot.service.ts b/src/api/integrations/typebot/services/typebot.service.ts index 1b9caa2a..31b3a06c 100644 --- a/src/api/integrations/typebot/services/typebot.service.ts +++ b/src/api/integrations/typebot/services/typebot.service.ts @@ -1,9 +1,10 @@ import { Message, Typebot as TypebotModel, TypebotSession } from '@prisma/client'; import axios from 'axios'; -import { ConfigService, S3, Typebot } from '../../../../config/env.config'; +import { Auth, ConfigService, HttpServer, S3, Typebot } from '../../../../config/env.config'; import { Logger } from '../../../../config/logger.config'; import { sendTelemetry } from '../../../../utils/sendTelemetry'; +import { ServerUP } from '../../../../utils/server-up'; import { InstanceDto } from '../../../dto/instance.dto'; import { PrismaRepository } from '../../../repository/repository.service'; import { WAMonitoringService } from '../../../services/monitor.service'; @@ -710,6 +711,8 @@ export class TypebotService { const prefilledVariables = { remoteJid: remoteJid, instanceName: instance.instanceName, + serverUrl: this.configService.get('SERVER').URL, + apiKey: this.configService.get('AUTHENTICATION').API_KEY.KEY, }; if (variables?.length) { @@ -904,6 +907,8 @@ export class TypebotService { remoteJid: data.remoteJid, pushName: data.pushName || data.prefilledVariables?.pushName || '', instanceName: instance.instanceName, + serverUrl: this.configService.get('SERVER').URL, + apiKey: this.configService.get('AUTHENTICATION').API_KEY.KEY, }, }; } else { @@ -917,6 +922,8 @@ export class TypebotService { remoteJid: data.remoteJid, pushName: data.pushName || data.prefilledVariables?.pushName || '', instanceName: instance.instanceName, + serverUrl: this.configService.get('SERVER').URL, + apiKey: this.configService.get('AUTHENTICATION').API_KEY.KEY, }, }, }; @@ -936,6 +943,8 @@ export class TypebotService { remoteJid: data.remoteJid, pushName: data.pushName || '', instanceName: instance.instanceName, + serverUrl: this.configService.get('SERVER').URL, + apiKey: this.configService.get('AUTHENTICATION').API_KEY.KEY, }, awaitUser: false, typebotId: data.typebotId,