From 43ef3e6a9166ec450ffcef30b963eaebbd6ecde1 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 9 Jun 2026 21:56:46 +0200 Subject: [PATCH] =?UTF-8?q?fix(adapter):=20Button-Detection=20False-Positi?= =?UTF-8?q?ve=20=E2=80=94=20::=20in=20Text=20matched=20Normalsprache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit '::' in text (Zeile 571) klassifizierte JEDE Nachricht mit :: als BUTTON_CLICK — z.B. Andreas' ':: Ich brauche den Wetterbericht'. Der Agent sah die Nachricht nie → keine Antwort trotz grünem Status. Fix: text.split('::', 1)[0].strip() != '' — erkennt nur echte Button-Payloads (wo vor :: tatsächlich Inhalt steht wie CLARIFY:id). ':: Nachricht' → split[0] ist leer → kein Button → MessageType.TEXT. Root Cause: Ein 3-Zeilen-ODER-Detector, der drei Payload-Formate in einer Variable vermischt. Fragil weil Substring-Match. --- plugin/adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/adapter.py b/plugin/adapter.py index bea9caf..7b39e55 100644 --- a/plugin/adapter.py +++ b/plugin/adapter.py @@ -568,7 +568,7 @@ class RocketChatAdapter(BasePlatformAdapter): msg_obj.get("actions") and msg_obj.get("params", {}).get("triggerSender") and msg_obj.get("params", {}).get("payload")) - or "::" in text + or (text and "::" in text and text.split("::", 1)[0].strip() != "") or (text and text.startswith("CLARIFY:")) )