mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
c602a31856
The UI already prevents child (delegated/subagent) chats from being
pinned, but the `PATCH /api/experimental/chats/{chat}` endpoint did not
enforce this. A direct API call could pin a child chat.
- Add a `400 Bad Request` guard in `patchChat` when `pinOrder > 0` and
the chat has a `ParentChatID`
- Add `TestChatPinOrder/RejectsChildChat` test
> 🤖
3 lines
150 B
SQL
3 lines
150 B
SQL
ALTER TABLE chats DROP CONSTRAINT IF EXISTS chats_pin_order_parent_check;
|
|
ALTER TABLE chats DROP CONSTRAINT IF EXISTS chats_pin_order_archived_check;
|