Skip to content

Your lightweight open-source personal agent.

fix: correct variable references in WhatsApp LID handling

Re-bin544eefbc8afc
diff --git a/nanobot/channels/whatsapp.py b/nanobot/channels/whatsapp.py
index 197401727..6e00e9dc1 100644
--- a/nanobot/channels/whatsapp.py
+++ b/nanobot/channels/whatsapp.py
@@ -108,12 +108,12 @@ class WhatsAppChannel(BaseChannel):
# Extract just the phone number or lid as chat_id
user_id = pn if pn else sender
- sender_id = user_id.split("@")[0] if "@" in sender else sender
+ sender_id = user_id.split("@")[0] if "@" in user_id else user_id
logger.info(f"Sender {sender}")
# Handle voice transcription if it's a voice message
if content == "[Voice Message]":
- logger.info(f"Voice message received from {chat_id}, but direct download from bridge is not yet supported.")
+ logger.info(f"Voice message received from {sender_id}, but direct download from bridge is not yet supported.")
content = "[Voice Message: Transcription not available for WhatsApp yet]"
await self._handle_message(