natureco-cli 1.0.28 → 1.0.29

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -193,7 +193,7 @@ async function startWhatsAppConnection(sessionDir, botId, selectedBot, config, a
193
193
  console.log(chalk.gray('\nSession kaydedildi: ~/.natureco/whatsapp-sessions/'));
194
194
 
195
195
  // Prepare allowed numbers list (add own number)
196
- const ownNumber = sock.user?.id?.replace('@s.whatsapp.net', '');
196
+ const ownNumber = sock.user?.id?.split(':')[0].replace('@s.whatsapp.net', '');
197
197
  const finalAllowedNumbers = ownNumber ? [ownNumber, ...allowedNumbersList] : allowedNumbersList;
198
198
 
199
199
  // Save to config
@@ -223,7 +223,7 @@ async function startWhatsAppConnection(sessionDir, botId, selectedBot, config, a
223
223
  for (const msg of messages) {
224
224
  if (msg.key.fromMe) continue; // kendi mesajları yoksay
225
225
 
226
- const sender = msg.key.remoteJid?.replace('@s.whatsapp.net', '');
226
+ const sender = msg.key.remoteJid?.split('@')[0].split(':')[0];
227
227
  const allowedNumbers = config.whatsappAllowedNumbers || [];
228
228
 
229
229
  // İzin listesi doluysa kontrol et