natureco-cli 1.0.37 → 1.0.38
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
CHANGED
|
@@ -236,6 +236,9 @@ async function startWhatsAppProvider(sessionDir, config) {
|
|
|
236
236
|
const sender = msg.key.remoteJid?.split('@')[0].split(':')[0];
|
|
237
237
|
const allowedNumbers = config.whatsappAllowedNumbers || [];
|
|
238
238
|
|
|
239
|
+
// Log incoming number before access control
|
|
240
|
+
log('whatsapp', `Incoming from: +${sender}, allowed: ${JSON.stringify(allowedNumbers)}`, 'gray');
|
|
241
|
+
|
|
239
242
|
// Access control
|
|
240
243
|
if (allowedNumbers.length > 0 && !allowedNumbers.includes(sender)) {
|
|
241
244
|
log('whatsapp', `blocked message from +${sender} (not in allowed list)`, 'yellow');
|