Private
Public Access
Make archiving a room actually affect existing members (#57)
is_archived was previously only exposed on the admin-only AdminRoom schema and checked in one place (excluding a room from Browse rooms) -- for anyone already a member it was a complete no-op: still in their sidebar, still fully postable, no indication anywhere it was archived. Expose is_archived on the regular RoomRead/MyRoomItem schemas, drop archived rooms from the sidebar list (while keeping them directly reachable via URL so history stays readable), and reject new messages in one -- both the WS "message" handler and incoming webhooks -- with a clear "archived and read-only" response instead of silently no-op'ing or a confusing membership error. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -37,7 +37,11 @@ export function Sidebar({
|
||||
}
|
||||
return room.name.toLowerCase().includes(query)
|
||||
}
|
||||
const filtered = rooms.filter(matchesQuery)
|
||||
// #57: archived rooms keep flowing through in `rooms` (so a member who
|
||||
// still has one open via a direct link resolves fine -- see ChatPane),
|
||||
// but they're a dead end going forward, so they don't belong in the list
|
||||
// you'd browse/search from.
|
||||
const filtered = rooms.filter((r) => !r.is_archived).filter(matchesQuery)
|
||||
const directMessages = filtered.filter((r) => r.is_dm)
|
||||
const regularRooms = filtered.filter((r) => !r.is_dm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user