fix: persist room operation cancellation across lost admission acknowledgments

This commit is contained in:
snowspeeder committed 2026-10-03 09:03:12 -04:00
1 parent 523f6cbbf9
commit 2ad9f36f4f
3 files changed
+62

No files matched your search

+9
View File
@@ -185,5 +185,14 @@ async def voice_cancel(room: str, rid: str, request: Request):
return {'run': await request.app.state.chat_runs.cancel(account['id'], rid)}
@router.post('/internal/chat/rooms/{room}/operations/{key}/cancel', dependencies=[Depends(internal_authorized)])
async def voice_cancel_operation(room: str, key: str, request: Request):
account = await room_owner(request, room)
try:
return await request.app.state.chat_runs.cancel_operation(account['id'], account['conversation_id'], key)
except KeyError:
raise HTTPException(404, 'Chat resource not found') from None
def create_chat_router():
return router