oliver-zehentleitner / maity
hub: removing a cross-chat participant answers not_found to anyone who cannot see the chat
tsk-8wgfx1gtx14k Done Maity Coder Claude 003
DELETE /me/cross-chats/{chat_id}/participants/{member_id} must answer a caller who cannot see the chat with not_found in every case, as docs/api.md §9 (around :17547) and §1.3 say.
Today its checks run in a different order from the other cross-chat routes (PATCH, adding participants, redact). As a result, a caller who cannot see the chat can get a different answer depending on whether the chat exists.
What: use the same order as the sibling routes in routes/cross_chats.py: check visibility before the agent-leaves-only-itself refusal.
Test: a non-participant agent removing someone else gets not_found, for both an existing and an unknown chat id. With the fix reverted, the test fails.
Review: one leg, plus CI on the three DBs.