@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.
- package/compiled_src/lib.js +20 -1
- package/dist/{1989dc3ac95.app.js → 1989dde475e.app.js} +1 -1
- package/dist/{1989dc3a5f1.chat.html → 1989dde475e.chat.html} +1 -1
- package/dist/{1989dc3ac95.chat.js → 1989dde475e.chat.js} +1 -1
- package/dist/{1989dc3a5f1.form.html → 1989dde475e.form.html} +1 -1
- package/dist/{1989dc3ac95.form.js → 1989dde475e.form.js} +1 -1
- package/dist/{1989dc3a5f1.index.html → 1989dde475e.index.html} +1 -1
- package/dist/{1989dc3a5f1.library.html → 1989dde475e.library.html} +1 -1
- package/dist/{1989dc3a5f1.library.js → 1989dde475e.library.js} +1 -1
- package/dist/{1989dc3a5f1.preview.html → 1989dde475e.preview.html} +1 -1
- package/dist/{1989dc3a5f1.preview.js → 1989dde475e.preview.js} +1 -1
- package/dist/{1989dc3a5f1.webview.js → 1989dde475e.webview.js} +1 -1
- package/dist/HASH +1 -1
- package/package.json +2 -2
- package/src/lib.js +16 -2
- package/src/store/store.js +2 -0
- package/dist/1989dc3a5f1.app.js +0 -1
- package/dist/1989dc3a5f1.chat.js +0 -1
- package/dist/1989dc3a5f1.form.js +0 -1
- package/dist/1989dc3ac95.127.js +0 -1
- package/dist/1989dc3ac95.132.js +0 -1
- package/dist/1989dc3ac95.185.js +0 -1
- package/dist/1989dc3ac95.27.js +0 -1
- package/dist/1989dc3ac95.278.js +0 -1
- package/dist/1989dc3ac95.339.js +0 -1
- package/dist/1989dc3ac95.459.js +0 -1
- package/dist/1989dc3ac95.490.js +0 -1
- package/dist/1989dc3ac95.74.js +0 -1
- package/dist/1989dc3ac95.997.js +0 -1
- package/dist/1989dc3ac95.chat.html +0 -1
- package/dist/1989dc3ac95.form.html +0 -1
- package/dist/1989dc3ac95.index.html +0 -71
- package/dist/1989dc3ac95.library.html +0 -71
- package/dist/1989dc3ac95.library.js +0 -1
- package/dist/1989dc3ac95.preview.html +0 -759
- package/dist/1989dc3ac95.preview.js +0 -1
- package/dist/1989dc3ac95.webview.js +0 -1
- package/malicious-app.js.hash.js +0 -17
- /package/dist/{1989dc3a5f1.127.js → 1989dde475e.127.js} +0 -0
- /package/dist/{1989dc3a5f1.132.js → 1989dde475e.132.js} +0 -0
- /package/dist/{1989dc3a5f1.185.js → 1989dde475e.185.js} +0 -0
- /package/dist/{1989dc3a5f1.27.js → 1989dde475e.27.js} +0 -0
- /package/dist/{1989dc3a5f1.278.js → 1989dde475e.278.js} +0 -0
- /package/dist/{1989dc3a5f1.339.js → 1989dde475e.339.js} +0 -0
- /package/dist/{1989dc3a5f1.459.js → 1989dde475e.459.js} +0 -0
- /package/dist/{1989dc3a5f1.490.js → 1989dde475e.490.js} +0 -0
- /package/dist/{1989dc3a5f1.74.js → 1989dde475e.74.js} +0 -0
- /package/dist/{1989dc3a5f1.997.js → 1989dde475e.997.js} +0 -0
package/compiled_src/lib.js
CHANGED
|
@@ -217,7 +217,26 @@ class Widget {
|
|
|
217
217
|
return this.store.sendConversion(formid, values, impressiontoken);
|
|
218
218
|
}
|
|
219
219
|
startConvo(req) {
|
|
220
|
-
|
|
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();
|