diff --git a/Docker/scripts/deploy_database.sh b/Docker/scripts/deploy_database.sh index 58922442c..772e74870 100755 --- a/Docker/scripts/deploy_database.sh +++ b/Docker/scripts/deploy_database.sh @@ -8,8 +8,7 @@ fi if [[ "$DATABASE_PROVIDER" == "postgresql" || "$DATABASE_PROVIDER" == "mysql" ]]; then export DATABASE_URL - ./node_modules/.bin/prisma migrate deploy --schema=prisma/$DATABASE_PROVIDER-schema.prisma - ./node_modules/.bin/prisma generate --schema=prisma/$DATABASE_PROVIDER-schema.prisma + ./node_modules/.bin/prisma migrate dev --name init --schema ./prisma/$DATABASE_PROVIDER-schema.prisma else echo "Error: Database provider $DATABASE_PROVIDER invalid." exit 1 diff --git a/src/api/integrations/typebot/services/typebot.service.ts b/src/api/integrations/typebot/services/typebot.service.ts index 7d48156cf..d6636dddf 100644 --- a/src/api/integrations/typebot/services/typebot.service.ts +++ b/src/api/integrations/typebot/services/typebot.service.ts @@ -712,10 +712,10 @@ export class TypebotService { 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}`, + 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';