chadtmiller.com/group-host
atmosphere group host
Moderators see what the group took down, where they review it
MergedThis adds a record to getModSubjectHistory and a new getModSubjectBlob, so moderators can see a taken-down record and its files. The console's Review shows them, and the in-place forms no longer navigate.
I read the Rust path closely: Host::reviewed, both handlers, and the subject_of/space_of checks. I did not read the web, docs, seed, lexicon JSON or test diffs.
- Group check:
subject_ofrequires the record's space authority to be this group, so a moderator of one group can't read another group's space through this route. - Read check:
reviewedalso requiresmay(.., Access::Read), so the queue never shows more than the space would if the takedown were lifted. - Blob check:
getModSubjectBlobserves only a CID the record itself holds (blob_refs), through the sameservedheaders asgetSpaceBlob(nosniff, private cache). - Parsing: the
subject[space.len() + 1..]slice and theexpectonsplit_onceare safe becausespace_ofhas already validated the URI's shape. - Hosting:
reviewedreturns nothing for an unhosted space.
Nothing needs to change before merge. The 100% line gate and the web, e2e and docs checks are left to CI, as the body says.
Since my approval at 4eb1551, the pull has one new commit of its own, plus a merge of main. The commit makes the console's /img/{did}/{cid} honour takedowns, as getSpaceBlob does. I read that diff in blobs.rs, the new test lines and the docs lines. I did not read the merged-in main changes, which aren't this pull's.
may_see: for each space holding the file, it now needs the caller to be allowed to read the space and the file not to be taken down there. Theexpectafter thetransposeis safe, because thecontinuehas already filtered out an unhosted space. A file that is up in one space but taken down in another is still served through the first, which is the right behaviour.- Moderators: they get no
/imgexception, and read the file throughgetModSubjectBlobinstead, as the body says. - Test: it asserts 404 on the taken-down map and 200 on the flyer that nothing taken down holds, for both a member and the moderator.
Nothing needs to change before merge.
What changes
Moderators see what was taken down, where they review it. A
!takedownlabel still hides a record and its files fromlistSpaceRecordsandgetSpaceBlobfor everyone, moderators included. NowgetModSubjectHistoryalso answers, for a subject that's a record in one of the group's spaces, therecordas the host's index holds it (defs#modRecordView:uri,cid,value,createdAt,takenDown), and the newfyi.opensocial.getModSubjectBlobserves the files that record holds, by CID, read from whoever wrote it. Both needmod.read, and both give the record only to a caller whom the space's policy lets read it.authModerateandauthManageGrouplist the new method, and a group session keeps it where its roles holdmod.read.The console's Review shows the post. A record subject's Review opens with What was posted: its text fields (times last, said as the console says times), its pictures (through
getModSubjectBlob), and the record as posted, folded, in a well that scrolls sideways. Taken down, it carries a Taken down tag and a line saying only moderators see it there (ReviewedRecord.svelte).An act on the Escalated or Resolved tab stays there. Since Kit 3,
use:enhancenavigates to where a form posted unless told not to, so labelling or taking down from?status=escalatedthrew the page back to Open with the dialog closed.#lib/forms.ts's in-place helpers now passnavigate: false; redirects are still followed./imghonours takedowns. The console's pictures at/img/{did}/{cid}no longer serve a file a takedown of the group's takes out of a space, to anyone, asgetSpaceBlobdoesn't; a moderator reads it throughgetModSubjectBlob. An image in a public repo is still served as before.Docs.
design/moderation.mdhas a part on reviewing what was taken down;reference/api.mdlists the method and the new field;design/signing-in.mdthe method a session keeps; the moderating guide has a part on taking a post down, with its picture. Themoderatingseed's reported post is now a real post of frank's with a picture, and the report names its version.Why
A takedown hid the content from everyone, so a moderator reviewing a report or an appeal saw the history but not what it was about. The narrowest fix is in the moderation path itself: the reads anyone (and any app a moderator uses) makes of a space still leave it out, and only the queue's own methods show it, to
mod.readholders the space lets read it, so the queue never shows anyone more than the space would if the takedown were lifted.How it was checked
shows_a_moderator_what_was_taken_down_where_they_review_it(tests/moderation.rs): a plain member and the moderator alike don't get the taken-down record or its file throughlistSpaceRecordsorgetSpaceBlob; the moderator gets the record,takenDown: true, and its file throughgetModSubjectHistoryandgetModSubjectBlob; a record left up comes withtakenDown: false; a file the record doesn't hold, an account, a record the index lacks, a public record and an unhosted space give none; a plain member getsForbidden; a moderator the space doesn't let read gets the history without the record. Run locally; the rest is left to thetestcheck.just lex,just fmt,node harness/layers.mjs,dialogs.mjs,strings.mjsandnpm run checkinweb/, locally.just look(the Review of frank's post before and after a takedown, the whole record open; desktop and phone, light and dark); the moderating guide's pictures drawn again withjust shots.Shortcomings
origin/appealsis older than the proposal catch-up; nothing here touches what it changes, but it will need to mergemain.Review
Start at
takedown.rs(Host::reviewed), then the two handlers at the end of the queue's inmoderation.rs.