Yeldaai / chat-plugin

Yelda Chat Plugin
MIT License
0 stars 0 forks source link

fix : client in localhost will not call yelda localhost endpoint #94

Closed meelie closed 3 years ago

meelie commented 3 years ago

if you accept the PR, don't merge : i'll run the plugin update process that will update the package.json version


Context : a client developer complained that

 yeldaChat.init({'settingId': '6006ef0cc31b98102ddd9b7e'}) 

Was calling localhost yelda endpoint ... which was expected because he was in local BUT client developers should load yelda prod url, even in local So this PR force yelda prod URL except for yelda staging env.

And if us, as Yelda developer, we want to load the plugin in local, we will have to do

 yeldaChat.init({'settingId': '6006ef0cc31b98102ddd9b7e', assistantUrl: 'http://localhost:8080' })