Selaa lähdekoodia

Stop warning about turns that have nothing to react to

The gateway runs agent-initiated turns — heartbeat polls, goal
continuations — through the same pipeline with message_id=None, so
on_processing_start fires with no inbound message to mark. Skipping is
correct (Signal's adapter does the same), but WARNING made a routine
condition read as a fault, and the message named both fields without
saying which was missing. Log the actual values at debug instead.

Drops the reactions-config line that printed on every message too.
Paul Klumpp 1 viikko sitten
vanhempi
commit
69dc2913ad
1 muutettua tiedostoa jossa 8 lisäystä ja 3 poistoa
  1. 8 3
      adapter.py

+ 8 - 3
adapter.py

@@ -1423,13 +1423,18 @@ class ChattoAdapter(BasePlatformAdapter):
 
         BasePlatformAdapter override
         """
-        logger.info("self.chatto_config.reactions.value: %s", self.chatto_config.reactions.value)
         if not self.chatto_config.reactions.value:
             return
-        
+
         chat_id, message_id = self._event_room_and_message_id(event)
         if not chat_id or not message_id:
-            logger.warning("Chatto: on_processing_start — empty chat_id or message_id, skipping reaction")
+            # Routine, not a fault: the gateway runs agent-initiated turns
+            # (heartbeat polls, goal continuations) through the same pipeline
+            # with message_id=None, and there is no inbound message to mark.
+            logger.debug(
+                "Chatto: nothing to react to (chat_id=%r, message_id=%r)",
+                chat_id, message_id,
+            )
             return
         await self.add_reaction(chat_id, message_id, "👀")