diff --git a/CHANGELOG.md b/CHANGELOG.md index a415eac8d..b812ffd4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Added chatwoot integration activation * Added typebot integration activation * Now you can register several typebots with triggers +* Media sent to typebot now goes as a template string, example: imageMessage:MESSAGE_ID ### Fixed diff --git a/src/api/integrations/typebot/services/typebot.service.ts b/src/api/integrations/typebot/services/typebot.service.ts index b28c548c5..7d48156cf 100644 --- a/src/api/integrations/typebot/services/typebot.service.ts +++ b/src/api/integrations/typebot/services/typebot.service.ts @@ -703,11 +703,6 @@ export class TypebotService { const types = { conversation: msg.conversation, extendedTextMessage: msg.extendedTextMessage?.text, - // Medias - audioMessage: `audioMessage:${msg.key.id}`, - imageMessage: `imageMessage:${msg.key.id}`, - videoMessage: `videoMessage:${msg.key.id}`, - documentMessage: `documentMessage:${msg.key.id}`, contactMessage: msg.contactMessage?.displayName, locationMessage: msg.locationMessage?.degreesLatitude, viewOnceMessageV2: @@ -716,6 +711,11 @@ export class TypebotService { msg.viewOnceMessageV2?.message?.audioMessage?.url, listResponseMessage: msg.listResponseMessage?.singleSelectReply?.selectedRowId, responseRowId: msg.listResponseMessage?.singleSelectReply?.selectedRowId, + // Medias + audioMessage: `audioMessage:${msg.key.id}`, + imageMessage: `imageMessage:${msg.key.id}`, + videoMessage: `videoMessage:${msg.key.id}`, + documentMessage: `documentMessage:${msg.key.id}`, }; const messageType = Object.keys(types).find((key) => types[key] !== undefined) || 'unknown'; diff --git a/start.sh b/start.sh deleted file mode 100644 index 06a55e4a5..000000000 --- a/start.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -if [ "$DOCKER_ENV" = "true" ]; -then - echo "Enabling environment variables for Docker" - echo "DOCKER_ENV=$DOCKER_ENV" - echo -else - mkdir -p ./dist/src - cp ./src/env.yml ./dist/src -fi -echo "> removing dist" -rm -rf ./dist -echo -echo "> transpiling..." -npm run build - -echo -echo "> Successfully build " - -echo -echo "> Starting application..." -echo - -node ./dist/src/main.js \ No newline at end of file