@raevon/n8n-nodes-whatsapp 1.0.4 → 1.0.5
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.
|
@@ -49,6 +49,18 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
49
49
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
50
50
|
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
51
51
|
const randBetween = (min, max) => max > min ? min + Math.floor(Math.random() * (max - min + 1)) : min;
|
|
52
|
+
// Silent logger — Baileys expects pino-compatible logger with these methods
|
|
53
|
+
const noop = () => { };
|
|
54
|
+
const silentLogger = {
|
|
55
|
+
level: 'silent',
|
|
56
|
+
info: noop,
|
|
57
|
+
warn: noop,
|
|
58
|
+
error: noop,
|
|
59
|
+
debug: noop,
|
|
60
|
+
fatal: noop,
|
|
61
|
+
trace: noop,
|
|
62
|
+
child: () => silentLogger,
|
|
63
|
+
};
|
|
52
64
|
// I8: Extracted ~ path expansion to avoid duplication
|
|
53
65
|
function expandHome(p) {
|
|
54
66
|
if (!p.startsWith('~'))
|
|
@@ -124,14 +136,14 @@ async function initSocket(cfg, authPath) {
|
|
|
124
136
|
browser: baileys_1.Browsers.ubuntu('n8n WhatsApp Node'),
|
|
125
137
|
auth: {
|
|
126
138
|
creds: state.creds,
|
|
127
|
-
keys: (0, baileys_1.makeCacheableSignalKeyStore)(state.keys,
|
|
139
|
+
keys: (0, baileys_1.makeCacheableSignalKeyStore)(state.keys, silentLogger),
|
|
128
140
|
},
|
|
129
141
|
// #11: Stealth flags — don't go online, don't sync history, no link previews
|
|
130
142
|
markOnlineOnConnect: false,
|
|
131
143
|
syncFullHistory: false,
|
|
132
144
|
shouldSyncHistoryMessage: () => false,
|
|
133
145
|
generateHighQualityLinkPreview: false,
|
|
134
|
-
logger:
|
|
146
|
+
logger: silentLogger,
|
|
135
147
|
});
|
|
136
148
|
socketInstance = sock;
|
|
137
149
|
socketStatus = 'connecting';
|
package/package.json
CHANGED