fix(archivar): integrate '::' into bypass branch, not Archivar call
The uncommitted diff from 06.06. had a bug: '::' (button response marker) was placed in the wrong elif branch, routing it through the Archivar instead of bypassing it. Fixed: '::' detection moved into the top-level bypass condition alongside is_button_response and _rooms_with_pending_questions. The dead 'elif room_type == d and is_auftrag' guard removed (redundant — DM orders never reach this branch). Last elif promoted to else.
This commit is contained in:
+2
-4
@@ -691,16 +691,14 @@ class RocketChatAdapter(BasePlatformAdapter):
|
|||||||
is_auftrag = _is_auftrag(text)
|
is_auftrag = _is_auftrag(text)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if is_button_response or room_id in self._rooms_with_pending_questions:
|
if is_button_response or "::" in text or room_id in self._rooms_with_pending_questions:
|
||||||
if not is_button_response:
|
if not is_button_response and "::" not in text:
|
||||||
logger.debug("[rocketchat] Room %s had pending question — Archivar bypassed", room_id)
|
logger.debug("[rocketchat] Room %s had pending question — Archivar bypassed", room_id)
|
||||||
self._rooms_with_pending_questions.discard(room_id)
|
self._rooms_with_pending_questions.discard(room_id)
|
||||||
elif skip_archivar:
|
elif skip_archivar:
|
||||||
logger.debug("[rocketchat] Archivar skipped — move-request just processed")
|
logger.debug("[rocketchat] Archivar skipped — move-request just processed")
|
||||||
elif room_id in self._sticky_rooms:
|
elif room_id in self._sticky_rooms:
|
||||||
logger.debug("[rocketchat] Room %s is sticky — Archivar bypassed", room_id[:8])
|
logger.debug("[rocketchat] Room %s is sticky — Archivar bypassed", room_id[:8])
|
||||||
elif room_type == "d" and is_auftrag:
|
|
||||||
logger.debug("[rocketchat] DM-Auftrag von %s — kein Routing", username)
|
|
||||||
else:
|
else:
|
||||||
decision = await self.archivar.classify_and_route(text, origin_room_id=room_id)
|
decision = await self.archivar.classify_and_route(text, origin_room_id=room_id)
|
||||||
if decision and decision.category:
|
if decision and decision.category:
|
||||||
|
|||||||
Reference in New Issue
Block a user