fix(P0): DM-Guard entfernt — confirm_move Copy-Schritt läuft jetzt auch bei DM-Origins
Rainer Analyse: adapter.py Z.2353 hatte 'if room_type != "d":' Guard der den Copy-Schritt bei DM-Origins übersprang. Entfernt. Telemetrie: confirm_move_dm_origin hinzugefügt.
This commit is contained in:
+22
-21
@@ -2349,27 +2349,28 @@ class RocketChatAdapter(BasePlatformAdapter):
|
||||
)
|
||||
# ── FIX 1 (P0): ISSUE 4 — Nachricht in Zielraum kopieren ──
|
||||
# V8.1 hatte den Copy-Schritt fälschlich entfernt.
|
||||
# DM-Aufträge werden NIE geroutet (DM-Guard).
|
||||
if room_type != "d":
|
||||
try:
|
||||
prefix = f"*(Auftrag von @{username}, hierher kopiert)*\n"
|
||||
target_copy_id = await self._post_message_with_retry(
|
||||
move_req["target_room"],
|
||||
prefix + move_req["text"],
|
||||
)
|
||||
if target_copy_id:
|
||||
self._recent_auto_routes[room_id]["target_message_id"] = target_copy_id
|
||||
routing_counter.increment('confirm_move_copied')
|
||||
logger.info(
|
||||
"[rocketchat] FIX 1: confirm_move copy → %s, "
|
||||
"target_msg_id=%s",
|
||||
move_req.get("target_name", "?")[:20],
|
||||
target_copy_id or "N/A",
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
"[rocketchat] FIX 1: confirm_move copy failed — %s", e
|
||||
)
|
||||
# P0-Fix: DM-Guard entfernt — Copy läuft jetzt auch bei DM-Origins.
|
||||
try:
|
||||
prefix = f"*(Auftrag von @{username}, hierher kopiert)*\n"
|
||||
target_copy_id = await self._post_message_with_retry(
|
||||
move_req["target_room"],
|
||||
prefix + move_req["text"],
|
||||
)
|
||||
if target_copy_id:
|
||||
self._recent_auto_routes[room_id]["target_message_id"] = target_copy_id
|
||||
routing_counter.increment('confirm_move_copied')
|
||||
if room_type == "d":
|
||||
routing_counter.increment('confirm_move_dm_origin')
|
||||
logger.info(
|
||||
"[rocketchat] FIX 1: confirm_move copy → %s, "
|
||||
"target_msg_id=%s",
|
||||
move_req.get("target_name", "?")[:20],
|
||||
target_copy_id or "N/A",
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
"[rocketchat] FIX 1: confirm_move copy failed — %s", e
|
||||
)
|
||||
elif choice in ("2", "2️⃣", "generell", "generell hier bleiben", "stay_here"):
|
||||
# 2️⃣ Generell hier bleiben → Antwort im Ursprungsraum + Sticky-Eintrag
|
||||
# P0-B: Thematischer Sticky (v7) — Thema aus Match-Ergebnis extrahieren
|
||||
|
||||
Reference in New Issue
Block a user