From 544eefbc8afc27bc5c05d1cdae6f2ccd9d81c220 Mon Sep 17 00:00:00 2001 From: Re-bin Date: Sat, 7 Feb 2026 17:40:46 +0000 Subject: [PATCH] fix: correct variable references in WhatsApp LID handling --- nanobot/channels/whatsapp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nanobot/channels/whatsapp.py b/nanobot/channels/whatsapp.py index 1974017..6e00e9d 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(