-
Notifications
You must be signed in to change notification settings - Fork 37
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
feat(webchat): port webchat injection #239
Conversation
This reverts commit 1e1dd78.
To try this out you can compile the bundle with For example with a server started on port 8080, and a messaging server started on port 3100 with a existing clientId of <!DOCTYPE html>
<html>
<head lang="en">
<meta charset="utf-8" />
</head>
<body>
<h1>Example website</h1>
<p>This website integrates the botpress webchat!</p>
</body>
<script src="http://localhost:8080/inject.js"></script>
<script>
window.botpressWebChat.init({
hostUrl: 'http://localhost:8080',
messagingUrl: 'http://localhost:3100',
clientId: '8b6b25ae-e47d-455e-8057-356dae07fff2'
})
</script>
</html>
|
@spg @medmouine @michaelmass I made a @botpress/webchat-inject package that contains all the assets that need to be on the CDN to be able to inject the webchat. You can inject the webchat using a script tag I think with this you should have everything you need to setup the CDN and get a working webchat for sending and receiving text. This port isn't finished yet, and so many features and settings don't work correctly for now. Any content type other than text won't work at the moment, but this should be fixed very soon. Anyways it's enough to test the websocket and setting up the CDN |
@laurentlp Should be good enough for a first pre-release |
WIP
This PR ports the webchat injection using a <script> tag.
Closes DEV-1884