web-manager 3.2.17 → 3.2.19
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +4 -4
- package/lib/account.js +9 -7
- package/package.json +2 -2
package/index.js
CHANGED
@@ -1379,6 +1379,10 @@ function Manager() {
|
|
1379
1379
|
) {
|
1380
1380
|
var chatsyPath = 'libraries.chatsy.config';
|
1381
1381
|
|
1382
|
+
// Immediately hide the fake button
|
1383
|
+
select('#prechat-btn').hide();
|
1384
|
+
|
1385
|
+
// Load the script
|
1382
1386
|
loadScript({
|
1383
1387
|
src: 'https://app.chatsy.ai/resources/script.js',
|
1384
1388
|
// src: 'http://localhost:4001/resources/script.js',
|
@@ -1393,10 +1397,6 @@ function Manager() {
|
|
1393
1397
|
// Listen for Chatsy status
|
1394
1398
|
chatsy.on('status', function(event, status) {
|
1395
1399
|
if (status === 'loaded') {
|
1396
|
-
setTimeout(function () {
|
1397
|
-
select('#prechat-btn').hide();
|
1398
|
-
}, 1000);
|
1399
|
-
|
1400
1400
|
chatsy.open();
|
1401
1401
|
}
|
1402
1402
|
})
|
package/lib/account.js
CHANGED
@@ -230,20 +230,20 @@ Account.prototype._resolveAccount = function (firebaseUser, account, options) {
|
|
230
230
|
|
231
231
|
// Resolve auth
|
232
232
|
account.auth = account.auth || {};
|
233
|
-
account.auth.email = account.auth.email || firebaseUser.email || null;
|
234
233
|
account.auth.uid = account.auth.uid || firebaseUser.uid || null;
|
234
|
+
account.auth.email = account.auth.email || firebaseUser.email || null;
|
235
235
|
account.auth.temporary = account.auth.temporary || false;
|
236
236
|
|
237
237
|
// Resolve plan
|
238
238
|
account.plan = account.plan || {};
|
239
239
|
account.plan.id = account.plan.id || defaultPlanId;
|
240
240
|
|
241
|
+
account.plan.status = account.plan.status || 'cancelled';
|
242
|
+
|
241
243
|
account.plan.expires = account.plan.expires || {};
|
242
244
|
account.plan.expires.timestamp = new Date(account.plan.expires.timestamp || 0).toISOString();
|
243
245
|
account.plan.expires.timestampUNIX = Math.round(new Date(account.plan.expires.timestamp || 0).getTime() / 1000);
|
244
246
|
|
245
|
-
account.plan.status = account.plan.status || 'cancelled';
|
246
|
-
|
247
247
|
account.plan.trial = account.plan.trial || {};
|
248
248
|
account.plan.trial.activated = account.plan.trial.activated || false;
|
249
249
|
account.plan.trial.expires = account.plan.trial.expires || {};
|
@@ -254,14 +254,16 @@ Account.prototype._resolveAccount = function (firebaseUser, account, options) {
|
|
254
254
|
// account.plan.devices = account.plan.devices || 1;
|
255
255
|
|
256
256
|
account.plan.payment = account.plan.payment || {};
|
257
|
-
account.plan.payment.
|
258
|
-
account.plan.payment.startDate.timestamp = account.plan.payment.startDate.timestamp || '1970-01-01T00:00:00.000Z';
|
259
|
-
account.plan.payment.startDate.timestampUNIX = account.plan.payment.startDate.timestampUNIX || 0;
|
260
|
-
account.plan.payment.frequency = account.plan.payment.frequency || 'unknown';
|
257
|
+
account.plan.payment.processor = account.plan.payment.processor || 'unknown';
|
261
258
|
account.plan.payment.orderId = account.plan.payment.orderId || 'unknown';
|
262
259
|
account.plan.payment.resourceId = account.plan.payment.resourceId || 'unknown';
|
260
|
+
account.plan.payment.frequency = account.plan.payment.frequency || 'unknown';
|
263
261
|
account.plan.payment.active = account.plan.payment.active || false;
|
264
262
|
|
263
|
+
account.plan.payment.startDate = account.plan.payment.startDate || {};
|
264
|
+
account.plan.payment.startDate.timestamp = account.plan.payment.startDate.timestamp || '1970-01-01T00:00:00.000Z';
|
265
|
+
account.plan.payment.startDate.timestampUNIX = account.plan.payment.startDate.timestampUNIX || 0;
|
266
|
+
|
265
267
|
account.plan.payment.updatedBy = account.plan.payment.updatedBy || {};
|
266
268
|
account.plan.payment.updatedBy.event = account.plan.payment.updatedBy.event || {};
|
267
269
|
account.plan.payment.updatedBy.event.id = account.plan.payment.updatedBy.event.id || 'unknown';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "web-manager",
|
3
|
-
"version": "3.2.
|
3
|
+
"version": "3.2.19",
|
4
4
|
"description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -36,4 +36,4 @@
|
|
36
36
|
"firebase": "^9.23.0",
|
37
37
|
"lazysizes": "^5.3.2"
|
38
38
|
}
|
39
|
-
}
|
39
|
+
}
|