@subiz/widget-v4 4.1.160 → 4.1.161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/compiled_src/lib.js +20 -1
  2. package/dist/{1989dc3ac95.app.js → 1989dde475e.app.js} +1 -1
  3. package/dist/{1989dc3a5f1.chat.html → 1989dde475e.chat.html} +1 -1
  4. package/dist/{1989dc3ac95.chat.js → 1989dde475e.chat.js} +1 -1
  5. package/dist/{1989dc3a5f1.form.html → 1989dde475e.form.html} +1 -1
  6. package/dist/{1989dc3ac95.form.js → 1989dde475e.form.js} +1 -1
  7. package/dist/{1989dc3a5f1.index.html → 1989dde475e.index.html} +1 -1
  8. package/dist/{1989dc3a5f1.library.html → 1989dde475e.library.html} +1 -1
  9. package/dist/{1989dc3a5f1.library.js → 1989dde475e.library.js} +1 -1
  10. package/dist/{1989dc3a5f1.preview.html → 1989dde475e.preview.html} +1 -1
  11. package/dist/{1989dc3a5f1.preview.js → 1989dde475e.preview.js} +1 -1
  12. package/dist/{1989dc3a5f1.webview.js → 1989dde475e.webview.js} +1 -1
  13. package/dist/HASH +1 -1
  14. package/package.json +2 -2
  15. package/src/lib.js +16 -2
  16. package/src/store/store.js +2 -0
  17. package/dist/1989dc3a5f1.app.js +0 -1
  18. package/dist/1989dc3a5f1.chat.js +0 -1
  19. package/dist/1989dc3a5f1.form.js +0 -1
  20. package/dist/1989dc3ac95.127.js +0 -1
  21. package/dist/1989dc3ac95.132.js +0 -1
  22. package/dist/1989dc3ac95.185.js +0 -1
  23. package/dist/1989dc3ac95.27.js +0 -1
  24. package/dist/1989dc3ac95.278.js +0 -1
  25. package/dist/1989dc3ac95.339.js +0 -1
  26. package/dist/1989dc3ac95.459.js +0 -1
  27. package/dist/1989dc3ac95.490.js +0 -1
  28. package/dist/1989dc3ac95.74.js +0 -1
  29. package/dist/1989dc3ac95.997.js +0 -1
  30. package/dist/1989dc3ac95.chat.html +0 -1
  31. package/dist/1989dc3ac95.form.html +0 -1
  32. package/dist/1989dc3ac95.index.html +0 -71
  33. package/dist/1989dc3ac95.library.html +0 -71
  34. package/dist/1989dc3ac95.library.js +0 -1
  35. package/dist/1989dc3ac95.preview.html +0 -759
  36. package/dist/1989dc3ac95.preview.js +0 -1
  37. package/dist/1989dc3ac95.webview.js +0 -1
  38. package/malicious-app.js.hash.js +0 -17
  39. /package/dist/{1989dc3a5f1.127.js → 1989dde475e.127.js} +0 -0
  40. /package/dist/{1989dc3a5f1.132.js → 1989dde475e.132.js} +0 -0
  41. /package/dist/{1989dc3a5f1.185.js → 1989dde475e.185.js} +0 -0
  42. /package/dist/{1989dc3a5f1.27.js → 1989dde475e.27.js} +0 -0
  43. /package/dist/{1989dc3a5f1.278.js → 1989dde475e.278.js} +0 -0
  44. /package/dist/{1989dc3a5f1.339.js → 1989dde475e.339.js} +0 -0
  45. /package/dist/{1989dc3a5f1.459.js → 1989dde475e.459.js} +0 -0
  46. /package/dist/{1989dc3a5f1.490.js → 1989dde475e.490.js} +0 -0
  47. /package/dist/{1989dc3a5f1.74.js → 1989dde475e.74.js} +0 -0
  48. /package/dist/{1989dc3a5f1.997.js → 1989dde475e.997.js} +0 -0
@@ -217,7 +217,26 @@ class Widget {
217
217
  return this.store.sendConversion(formid, values, impressiontoken);
218
218
  }
219
219
  startConvo(req) {
220
- if (!req.is_light) return this.store.startConvo(req);else return this.store.startLightConvo(req.bot_id, req.welcome_message, req.locale, req.is_testing, req.bot_version);
220
+ req = _index.default.cloneDeep(req) || {};
221
+ if (req.welcome_message) {
222
+ return this.store.startLightConvo(req.bot_id, req.welcome_message, req.locale, req.is_testing, req.bot_version);
223
+ }
224
+ console.log(req);
225
+ let members = req.members || [];
226
+ if (req.bot_id) {
227
+ let botid = req.bot_id;
228
+ delete req.bot_id;
229
+ if (!_index.default.find(members, m => b.id == botid)) {
230
+ members.push({
231
+ type: 'bot',
232
+ id: botid,
233
+ bot_version: req.bot_version
234
+ });
235
+ }
236
+ }
237
+ req.members = members;
238
+ req.initial_by = this.store.matchUser().id;
239
+ return this.store.startConvo(req);
221
240
  }
222
241
  async showGreeting() {
223
242
  await this.domGate.entry();