auto-sync: 2026-06-03 18:28:40

This commit is contained in:
cfdaily
2026-06-03 18:28:40 +08:00
parent bb1ffc8edc
commit 14e757f01e
3 changed files with 46 additions and 0 deletions
+13
View File
@@ -319,6 +319,19 @@ async def add_comment(project_id: str, task_id: str, body: Dict[str, Any]):
mentions=merged_mentions)
if merged_mentions:
bb.record_mentions(cid, task_id, merged_mentions)
# #10: SSE 通知前端黑板有新 comment
try:
from src.api.sse_routes import get_broker
broker = get_broker()
broker.publish_sync("comment_added", {
"project_id": project_id,
"task_id": task_id,
"comment_id": cid,
"author": body["author"],
})
except Exception:
pass
return {"ok": True, "comment_id": cid, "mentions": merged_mentions}