fix(P0): ISSUE 4 — confirm_move kopiert Nachricht in Zielraum

- Copy-Schritt aus user-flow-c.md Z.229-231 wiederhergestellt
- Prefix: *(Auftrag von @<username>, hierher kopiert)*
- target_message_id in _recent_auto_routes gespeichert (für Issue 5)
- DM-Guard: DM-Aufträge werden NIE geroutet
- Telemetrie: confirm_move_copied
- Fehler beim Copy bricht Dispatch nicht ab
This commit is contained in:
Bernd (Hermes)
2026-07-25 11:11:53 +02:00
parent f21075eddd
commit eece2f9950
+23
View File
@@ -2319,6 +2319,29 @@ class RocketChatAdapter(BasePlatformAdapter):
"room=%s → target=%s, topic='%s' (30 Min, confirm_move)",
room_id[:8], move_req.get("target_name", "?")[:20], move_sticky_topic,
)
# ── 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
)
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