diff --git a/integrations/whatsapp/src/actions/start-conversation.ts b/integrations/whatsapp/src/actions/start-conversation.ts index f26d5398a7b..caf451d0af7 100644 --- a/integrations/whatsapp/src/actions/start-conversation.ts +++ b/integrations/whatsapp/src/actions/start-conversation.ts @@ -1,5 +1,4 @@ import { RuntimeError, z } from '@botpress/sdk' -import { formatPhoneNumber } from 'src/misc/phone-number-to-whatsapp' import { hasAtleastOne } from 'src/misc/util' import { BodyComponent, BodyParameter, Language, Template } from 'whatsapp-api-js/messages' import { getDefaultBotPhoneNumberId, getAuthenticatedWhatsappClient } from '../auth' @@ -42,7 +41,8 @@ export const startConversation: bp.IntegrationProps['actions']['startConversatio channel: 'channel', tags: { botPhoneNumberId, - userPhone: formatPhoneNumber(userPhone), + userPhone, + // userPhone: formatPhoneNumber(userPhone), // TODO: Uncomment when we have fixed the issue }, }) diff --git a/integrations/whatsapp/src/webhook/handlers/messages.ts b/integrations/whatsapp/src/webhook/handlers/messages.ts index c0f1ac1ce9d..69b902b784d 100644 --- a/integrations/whatsapp/src/webhook/handlers/messages.ts +++ b/integrations/whatsapp/src/webhook/handlers/messages.ts @@ -2,7 +2,6 @@ import { RuntimeError } from '@botpress/client' import { ValueOf } from '@botpress/sdk/dist/utils/type-utils' import axios from 'axios' import { getAccessToken, getAuthenticatedWhatsappClient } from 'src/auth' -import { formatPhoneNumber } from 'src/misc/phone-number-to-whatsapp' import { getMessageFromWhatsappMessageId } from 'src/misc/util' import { WhatsAppMessage, WhatsAppMessageValue } from '../../misc/types' import { getMediaInfos } from '../../misc/whatsapp-utils' @@ -40,7 +39,8 @@ async function _handleIncomingMessage( const { conversation } = await client.getOrCreateConversation({ channel: 'channel', tags: { - userPhone: formatPhoneNumber(message.from), + userPhone: message.from, + // userPhone: formatPhoneNumber(message.from), // TODO: Uncomment when we have fixed the issue botPhoneNumberId: value.metadata.phone_number_id, }, })