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
4 changes: 2 additions & 2 deletions integrations/whatsapp/src/actions/start-conversation.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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
},
})

Expand Down
4 changes: 2 additions & 2 deletions integrations/whatsapp/src/webhook/handlers/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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,
},
})
Expand Down
Loading