From 48bc8c6337a7efbff340a1c4a1dbcf6acfb0d3dc Mon Sep 17 00:00:00 2001 From: Jack Kingsman Date: Mon, 9 Mar 2026 00:41:07 -0700 Subject: [PATCH] Improve bot error bubble uo along with a few other spots --- app/fanout/bot.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/fanout/bot.py b/app/fanout/bot.py index 9cd2ef8..7384325 100644 --- a/app/fanout/bot.py +++ b/app/fanout/bot.py @@ -52,10 +52,17 @@ class BotModule(FanoutModule): msg_type = data.get("type", "") is_dm = msg_type == "PRIV" + conversation_key = data.get("conversation_key", "") + logger.debug( + "Bot '%s' starting for type=%s conversation=%s outgoing=%s", + self.name, + msg_type or "unknown", + conversation_key[:12] if conversation_key else "(none)", + bool(data.get("outgoing", False)), + ) # Extract bot parameters from broadcast data if is_dm: - conversation_key = data.get("conversation_key", "") sender_key = data.get("sender_key") or conversation_key is_outgoing = data.get("outgoing", False) message_text = data.get("text", "") @@ -73,7 +80,6 @@ class BotModule(FanoutModule): contact = await ContactRepository.get_by_key(conversation_key) sender_name = contact.name if contact else None else: - conversation_key = data.get("conversation_key", "") sender_key = None is_outgoing = bool(data.get("outgoing", False)) sender_name = data.get("sender_name")