Community actors name their moderators the way Lemmy reads them
Build / Build (push) Successful in 41s
Deploy / privapub.thepra.dev (push) Successful in 1m1s

attributedTo points at /wardens and postingRestrictedToMods reflects the
posting policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-01 12:31:13 +02:00
1 parent a5d9a89445
commit 51f2c10c6f
2 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -52,7 +52,7 @@ A group is either a **community** or a **circle**.
moderators only) and the group `Announce`s the whole activity, with `audience` set, to its followers. A new post is moderators only) and the group `Announce`s the whole activity, with `audience` set, to its followers. A new post is
also announced as an object so Mastodon shows it. Updates and deletes of community content are announced too. A also announced as an object so Mastodon shows it. Updates and deletes of community content are announced too. A
top-level post is a `Page` with a `name`. Members are counted at `/flock`; moderators are listed at `/wardens`, which top-level post is a `Page` with a `name`. Members are counted at `/flock`; moderators are listed at `/wardens`, which
`attributedTo` does not yet point to. A mention of a community posts into it. the actor's `attributedTo` points to, with `postingRestrictedToMods` as Lemmy expects. A mention of a community posts into it.
- A **circle** is private. Its actor is not discoverable and every follow is a request. Its posts are addressed to the - A **circle** is private. Its actor is not discoverable and every follow is a request. Its posts are addressed to the
circle and its members collection, delivered to each member's own inbox and never announced. They are served only circle and its members collection, delivered to each member's own inbox and never announced. They are served only
to a signed request from a member, or from the instance actor of a member's server; anyone else gets 404. A to a signed request from a member, or from the instance actor of a member's server; anyone else gets 404. A
@@ -97,6 +97,11 @@ namespace PrivaPub.Federation.Rendering
["value"] = FieldValue(field.Value) ["value"] = FieldValue(field.Value)
}).ToArray()) }).ToArray())
}; };
if (actor is { Kind: LocalActorKind.Group, IsCircle: false })
{
document["attributedTo"] = actor.Wardens;
document["postingRestrictedToMods"] = actor.PostingRestrictedToModerators;
}
if (!string.IsNullOrEmpty(actor.PictureURL)) if (!string.IsNullOrEmpty(actor.PictureURL))
document["icon"] = new JsonObject { ["type"] = "Image", ["url"] = actor.PictureURL }; document["icon"] = new JsonObject { ["type"] = "Image", ["url"] = actor.PictureURL };
if (!string.IsNullOrEmpty(actor.ThumbnailURL)) if (!string.IsNullOrEmpty(actor.ThumbnailURL))