From 2ffb7cb3e3b83793d0efbb248f2885e3863282c5 Mon Sep 17 00:00:00 2001 From: "Bernd (Hermes)" Date: Thu, 13 Aug 2026 18:47:17 +0200 Subject: [PATCH] fix(P-066): Clarify-Buttons gerendert + deutsche Labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG 1 — Other-Button ohne action_id (P-051): RC 6.x ignoriert gesamten actions-Array wenn ein Button kein action_id hat → KEINE Buttons sichtbar. Fix: action_id via hashlib.sha1(payload:0)[:12] ergänzt (konsistent mit _build_custom_buttons in __init__.py und _make_action_id in button_builder.py). BUG 2 — Englische Labels: - 'Other' → 'Andere (Freitext)' - 'Please choose an option:' → 'Bitte wähle eine Option:' Zusätzlich: hashlib-Import ergänzt (fehlte in adapter.py). --- plugin/adapter.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugin/adapter.py b/plugin/adapter.py index 60faa1e..123b9c3 100644 --- a/plugin/adapter.py +++ b/plugin/adapter.py @@ -12,6 +12,7 @@ import asyncio import concurrent.futures import contextvars import datetime +import hashlib import json import logging import os @@ -7254,18 +7255,20 @@ class RocketChatAdapter(BasePlatformAdapter): buttons = _build_custom_buttons(button_labels, prefix=f"CLARIFY:{clarify_id}") # Add "Other" button with special handling + other_payload = f"CLARIFY:{clarify_id}:other" buttons.append({ "type": "button", - "text": "✏️ Other", - "msg": f"CLARIFY:{clarify_id}:other", + "text": "✏️ Andere (Freitext)", + "msg": other_payload, "msg_in_chat_window": True, "style": "default", + "action_id": hashlib.sha1(f"{other_payload}:0".encode()).hexdigest()[:12], }) # Create attachment with buttons attachments = [{ "color": "#1d74f5", - "title": "Please choose an option:", + "title": "Bitte wähle eine Option:", "actions": buttons, }]