@vielhuber/wahelper 1.8.3 → 1.8.4
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/package.json +1 -1
- package/wahelper-daemon.js +5 -3
package/package.json
CHANGED
package/wahelper-daemon.js
CHANGED
|
@@ -274,7 +274,7 @@ export default class wahelperDaemon {
|
|
|
274
274
|
this.log('storeDataToDatabase');
|
|
275
275
|
|
|
276
276
|
let messages = Array.isArray(data?.messages) ? data.messages : [];
|
|
277
|
-
let chats = Array.isArray(data?.chats) ? data.chats : [];
|
|
277
|
+
let chats = Array.isArray(data) ? data : Array.isArray(data?.chats) ? data.chats : [];
|
|
278
278
|
if (messages.length === 0 && chats.length === 0) {
|
|
279
279
|
return;
|
|
280
280
|
}
|
|
@@ -1148,5 +1148,7 @@ export default class wahelperDaemon {
|
|
|
1148
1148
|
}
|
|
1149
1149
|
}
|
|
1150
1150
|
|
|
1151
|
-
|
|
1152
|
-
daemon
|
|
1151
|
+
if (process.argv[1] && fs.realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
1152
|
+
let daemon = new wahelperDaemon();
|
|
1153
|
+
daemon.init();
|
|
1154
|
+
}
|