auto-sync: 2026-06-03 18:28:40
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user