R6 moderation: roles, silence and suspension, bans that write nothing on the personas, deletions, report actions

Roles (user, moderator, administrator) from the CLI and /clientapi/admin/roots/{id}/role, never one's own nor the last
administrator. Silence keeps an account's posts out of public timelines, hashtags, trends, search and relays while its
followers still get them; suspension refuses and revokes a local persona's tokens, answers 404 for its posts and
collections, holds back every delivery and tells other servers nothing new, its actor unchanged; a suspended remote
account's activities are dropped and nothing goes to its own inbox (a shared one still serves its server). A banned
login's personas are held back in memory alone (Restrictions), so nothing pairs them in stored data. Personas and groups
are deleted one at a time (PersonaRemoval, GroupRemoval), by their login or an administrator with the password. Reports
resolve with an action and a note; posts are taken down, a remote copy hidden. Warnings reach the persona as Mastodon's
moderation_warning. Every staff act goes to the staff's log. Migration _020 limits posts from servers already silenced;
a restore keeps the moderation made since the backup.

Verified: interop.sh moderation gts mastodon with SecureMode, 194 passed; restore.sh, 25 passed, now with a suspension,
a silence and a takedown made after the backup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WpVCoDeM1qUTRp4fXQdfof
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-17 05:23:45 +02:00
1 parent 70d1ffe9a2
commit 9f68ca3ed0
71 files changed
+2229 -219

No files matched your search

+25
View File
@@ -380,6 +380,31 @@ persona's public post outside any group, its edit and its deletion also go to th
only with an LD signature or an FEP-8b32 proof: PrivaPub's carry a proof, so they reach Mastodon through both kinds of
relay (checked live).
## Moderation
What this server's staff does to an account tells other servers nothing new (owner decision 2026-10-17): no `Flag`,
`Block`, `Update` or `Delete` is sent for a silence or a suspension, and none is undone when it is lifted.
- **A persona silenced here** stays out of this server's public and hashtag timelines, trends, directory and search,
and its posts no longer go to the relays. Everything else is as before: its actor, its collections, and every
delivery to its followers and to the accounts it addresses.
- **A persona suspended here** (by the staff, or with its login banned) delivers nothing, takes no new follower (a
`Follow` is left unanswered, as one waiting for a locked account's approval), and its outbox, followers, following,
featured collections, posts, activities, replies, contexts, wall and quote permissions answer 404, signed or not. Its
actor document, its inbox (202, as ever) and WebFinger stay exactly as they were, so lifting the suspension serves
everything again without telling anyone it happened. A post of it removed meanwhile is deleted here only. The one thing
it may still send is the `Delete` of itself, if it is deleted.
- **An account elsewhere suspended here:** what it sends is dropped after the 202, but a `Delete` or an `Undo`; nothing
is addressed to it, and nothing goes to its own inbox (its server's shared inbox still serves the others there).
Silenced, its posts stay out of the public timelines here. Its server hears of neither.
- **A server silenced** (a domain block of `silence`) has its accounts' posts kept out of the public timelines here, as a
silenced account's are; a suspended one is refused at the inbox, as before.
- **A post removed** by the staff: one of ours is deleted as its author would delete it (a `Delete` to its audience); a
copy of one from elsewhere is hidden here and never taken in again, and its server is not told.
- **A persona or a group deleted** (by its login, its owner or an administrator): a `Delete` of the actor to its
followers, the accounts it follows and a group's members elsewhere; its documents answer 410 from then on, and its name
is never given again.
## Server descriptions and the crawler
PrivaPub keeps statistics about servers, never about accounts (see `/stargazing` on the server).