Skip to content

Commit

Permalink
fix: Webviews not redirecting correctly on WhatsApp Cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaeshah committed Mar 6, 2023
1 parent bf5ec25 commit 7781601
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/botonic-react/src/webview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class App extends React.Component {
const provider = this.state.session.user.provider
const impId = this.state.session.user.imp_id
if (provider === PROVIDER.WHATSAPP) {
location.href = 'https://wa.me/' + impId
const phone_number = this.state.session.user.unformatted_phone_number
location.href = 'https://wa.me/' + phone_number
}
if (provider === PROVIDER.TELEGRAM) {
location.href = 'https://t.me/' + impId
Expand Down

0 comments on commit 7781601

Please sign in to comment.