fix(adapter): Button-Detection False-Positive — :: in Text matched Normalsprache
'::' 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.
This commit is contained in:
+1
-1
@@ -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:"))
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user