fix(adapter): move same-room check before _THEMATIC_TARGET_ROOM.set()
This commit is contained in:
+7
-5
@@ -907,6 +907,13 @@ class RocketChatAdapter(BasePlatformAdapter):
|
||||
decision = await self.archivar.classify_and_route(text, origin_room_id=room_id)
|
||||
if decision and decision.category:
|
||||
category = decision.category
|
||||
# Wenn Zielraum = Ursprungsraum → stay_in_room, kein Move-Request
|
||||
# MUSS VOR _THEMATIC_TARGET_ROOM.set() kommen, sonst wird
|
||||
# der Zielraum gesetzt und send() routet in den DM
|
||||
if (hasattr(decision, 'target_room') and decision.target_room
|
||||
and decision.target_room == room_id):
|
||||
decision.stay_in_room = True
|
||||
decision.move_request_sent = False
|
||||
# ── Archivar-Kontext-Weitergabe: Zielraum + Frage-Nr ──────
|
||||
if hasattr(decision, 'target_room') and decision.target_room:
|
||||
_THEMATIC_TARGET_ROOM.set(decision.target_room)
|
||||
@@ -914,11 +921,6 @@ class RocketChatAdapter(BasePlatformAdapter):
|
||||
with _question_counter_lock:
|
||||
_question_counter += 1
|
||||
# ── Ende Kontext-Weitergabe ──────────────────────────────
|
||||
# Wenn Zielraum = Ursprungsraum → stay_in_room, kein Move-Request
|
||||
if (hasattr(decision, 'target_room') and decision.target_room
|
||||
and decision.target_room == room_id):
|
||||
decision.stay_in_room = True
|
||||
decision.move_request_sent = False
|
||||
# Archivar v4 Move-Request: _pending_move_requests befüllen, damit
|
||||
# der Button-Response-Handler (lines 717-764) die Antwort korrekt
|
||||
# verarbeiten und _CURRENT_ORIGIN_ROOM auf den Zielraum setzen kann.
|
||||
|
||||
Reference in New Issue
Block a user