Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions integrations/chat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,20 @@ COPY ./tsconfig.json /usr/app/tsconfig.json
COPY integrations/chat ./integrations/chat
COPY patches/source-map-js@1.2.1.patch patches/source-map-js@1.2.1.patch

# install
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --dir integrations/chat
RUN pnpm --dir packages/sdk add @bpinternal/zui --save-prod
RUN pnpm --dir packages/cli add @botpress/sdk@workspace:* --workspace
RUN pnpm install --frozen-lockfile --dir packages/sdk
RUN pnpm install --frozen-lockfile --dir packages/cli

# Use production node environment by default
# Use NODE_ENV to avoid installing devDependencies
ENV NODE_ENV=production

# build dependencies in correct order: client -> chat-client -> SDK -> CLI -> chat integration
RUN pnpm --filter @botpress/client run build
# install
RUN pnpm install --frozen-lockfile
RUN pnpm --filter @bpinternal/zui run build
RUN pnpm --filter @botpress/chat run build
RUN pnpm --filter @botpress/client run build
RUN pnpm --filter @botpress/sdk run build
RUN pnpm --filter @botpress/cognitive run build
RUN pnpm --filter @botpress/cli run bundle
RUN pnpm --filter @botpresshub/chat run build


FROM node:${NODE_VERSION}-bullseye-slim AS deploy

COPY --from=base /usr/app/integrations/chat/.botpress/dist/index.cjs ./index.cjs
Expand Down
2 changes: 1 addition & 1 deletion integrations/whatsapp/integration.definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const defaultBotPhoneNumberId = {
}

export const INTEGRATION_NAME = 'whatsapp'
export const INTEGRATION_VERSION = '4.7.0'
export const INTEGRATION_VERSION = '4.7.1'
export default new IntegrationDefinition({
name: INTEGRATION_NAME,
version: INTEGRATION_VERSION,
Expand Down
7 changes: 6 additions & 1 deletion integrations/whatsapp/sandboxIdentifierExtract.vrl
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@ if actualSignature != expectedSignature {
null
} else {
body = parse_json!(.body)
body.entry[0].changes[0].value.contacts[0].wa_id
value = body.entry[0].changes[0].value
if !is_nullish(value.statuses) && length!(value.statuses) > 0 {
value.statuses[0].recipient_id
} else {
value.contacts[0].wa_id
}
}
Loading