From e7e6b66ba2b0ce3110027a56de5f784840821e32 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 9 Jun 2026 21:32:07 +0200 Subject: [PATCH] =?UTF-8?q?fix(adapter):=20CLARIFY-Trennzeichen-Bug=20?= =?UTF-8?q?=E2=80=94=20::=20vs=20:=20zwischen=20clarify=5Fid=20und=20choic?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _build_custom_buttons() sendet Payloads mit :: (Doppel-Doppelpunkt), aber _process_incoming() splittete mit text.split(':', 2) → choice=':1' → ':1'.isdigit()=False → Clarify nie resolved → Gateway Timeout. Fix: Zweistufiger Split — erst '::' prüfen (neues Format), dann ':' als Fallback (Other-Button). Beide Formate werden erkannt: - CLARIFY:id::1 (numerischer Button) - CLARIFY:id:other (Other-Button) Architektur: Rainer | Implementierung: Miguel | QG: Rainer F1-F5 bestanden --- plugin/adapter.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugin/adapter.py b/plugin/adapter.py index afba79f..bea9caf 100644 --- a/plugin/adapter.py +++ b/plugin/adapter.py @@ -638,8 +638,16 @@ class RocketChatAdapter(BasePlatformAdapter): # Handle CLARIFY button responses: CLARIFY:: or CLARIFY::other if is_clarify_response and text.startswith("CLARIFY:"): try: - parts = text.split(":", 2) - if len(parts) == 3: + if "::" in text: + # Neues Format: CLARIFY::: (via _build_custom_buttons) + prefix_part, choice = text.split("::", 1) + clarify_id = prefix_part.split(":", 1)[1] + else: + # Altes Format: CLARIFY::other (Other-Button) + parts = text.split(":", 2) + if len(parts) != 3: + logger.debug("[rocketchat] Unrecognized CLARIFY format: %s", text) + return _, clarify_id, choice = parts if choice == "other": # For "Other" button, enable text capture mode