MCPcopy
hub / github.com/AstrBotDevs/AstrBot / dashboard_send_thread_message

Function dashboard_send_thread_message

astrbot/dashboard/api/chat.py:445–462  ·  view source on GitHub ↗
(
    request: Request,
    username: str = Depends(require_dashboard_user),
    service: ChatService = Depends(get_service),
)

Source from the content-addressed store, hash-verified

443
444@legacy_router.post("/thread/send")
445async def dashboard_send_thread_message(
446 request: Request,
447 username: str = Depends(require_dashboard_user),
448 service: ChatService = Depends(get_service),
449):
450 try:
451 payload = await service.prepare_thread_chat_payload_from_dashboard_payload(
452 username,
453 await _json_or_empty(request),
454 )
455 except ChatServiceError as exc:
456 return JSONResponse(error(str(exc)))
457 return await _send_chat(
458 request=request,
459 username=username,
460 service=service,
461 payload=payload,
462 )
463
464
465@legacy_router.post("/thread/delete")

Callers

nothing calls this directly

Calls 4

errorFunction · 0.90
_send_chatFunction · 0.85
_json_or_emptyFunction · 0.70

Tested by

no test coverage detected