fix(adapter): stay_in_room vom Router respektieren

Bug: Der Router setzte stay_in_room=True (excluded_rooms, Meta-Fragen,
Keyword-Match auf Ursprungsraum), aber der Adapter ignorierte das Flag.
Er prüfte nur target_room != room_id → routete trotzdem.

Symptom: 'Die RC Beschreibung klingt toll' aus #Rocketchat-Plugin
löste Move-Request aus, obwohl:
- excluded_rooms → stay_in_room=True
- 'RC' matcht keywords_100 'rc' → Ziel = Ursprungsraum

Fix: Eine Zeile in der Routing-Bedingung:
  and not getattr(decision, 'stay_in_room', False)

Jetzt respektiert der Adapter, wenn der Router sagt 'bleib hier'.
This commit is contained in:
Hermes Agent
2026-06-12 20:43:45 +02:00
parent 6b97ccfad9
commit 2b53537638
+2 -1
View File
@@ -783,7 +783,8 @@ class RocketChatAdapter(BasePlatformAdapter):
forwarded = False
if (decision and hasattr(decision, 'target_room') and decision.target_room
and decision.target_room != room_id
and not getattr(decision, 'is_unrouteable', False)):
and not getattr(decision, 'is_unrouteable', False)
and not getattr(decision, 'stay_in_room', False)): # ← Router sagt "bleib hier"
target_name = getattr(decision, 'matched_room_name', None)
if not target_name: