Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tech-feat: adapt botonic code to use new flow builder backend endpoints #2972

Open
wants to merge 7 commits into
base: master-lts
Choose a base branch
from

Conversation

vanbasten17
Copy link
Contributor

@vanbasten17 vanbasten17 commented Jan 27, 2025

Description

  • Update bot flow endpoints to point to new hubtype-backend endpoints

Context

  • Part of process of migrating flow builder to backend

Approach taken / Explain the design

To document / Usage example

Testing

The pull request...

  • has unit tests
  • has integration tests
  • doesn't need tests because... [provide a description]

@vanbasten17 vanbasten17 force-pushed the BLT-1345-botonic-to-use-flow-builder-endpoints-in-hubtype-backend branch from 35cea74 to 303daee Compare January 28, 2025 15:02
Comment on lines +39 to +44
const updatedRequest = newApi.request
newApi.flowUrl = options.flowUrl.replace(
'{bot_id}',
updatedRequest.session.bot.id
)
newApi.flow = options.flow ?? (await newApi.getFlow(options.accessToken))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to make it work correctly in local, we should retrieve botId from userInfo, not from incoming session.bot.user.id, because it will be the default for webchat dev ('00000')
This should be refactored at some point

@vanbasten17 vanbasten17 marked this pull request as ready for review January 29, 2025 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant