Manage followers from the API and web UI (phase 2, step 6)
CI / validate-monitoring (push) Successful in 7s
CI / lint (push) Successful in 11s
CI / test (push) Successful in 2m4s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 6s

- /api/v1/federation: list followers and requests, approve (Accept),
  decline or remove (Reject), block (Block, and future follows are
  refused), list and remove blocks; settings report follower counts
- The actor now reflects the user's real follow-approval setting and
  the followers collection its accepted count
- Turning sharing off sends every follower a Reject and forgets them;
  while those are being delivered the actor stays fetchable with just
  its key (no name or bio) so other servers can verify them, and
  WebFinger already says not found
- Web UI: a Followers page (requests with Approve/Decline, followers
  with Remove/Block behind a confirm step, blocked accounts with
  Unblock; remote names shown as plain text only), follower counts on
  the Sharing page, and a confirmation before turning sharing off
  when that would remove followers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
mattandClaude Opus 5.5 committed 2026-09-25 21:42:29 +01:00
1 parent 142dc13fea
commit a90cd14f59
12 files changed
+1083 -18

No files matched your search

+25 -2
View File
@@ -23,8 +23,9 @@ class SharingSettingsSchema(Schema):
handle = fields.String(dump_only=True, metadata={"example": "@alice@scrobble.example"})
actor_url = fields.String(dump_only=True)
profile_url = fields.String(dump_only=True)
followers = fields.Integer(
dump_only=True, metadata={"description": "0 until following arrives"}
followers = fields.Integer(dump_only=True, metadata={"description": "Accepted followers"})
pending_followers = fields.Integer(
dump_only=True, metadata={"description": "Waiting for approval"}
)
@@ -38,3 +39,25 @@ class PublicProfileSchema(Schema):
class SharingSettingsUpdateSchema(SharingSettingsSchema):
"""Any subset of the editable settings (read-only fields are rejected)."""
class FollowerSchema(Schema):
id = fields.Integer()
state = fields.String(validate=validate.OneOf(["pending", "accepted"]))
handle = fields.String(metadata={"example": "@bob@mastodon.example"})
display_name = fields.String(allow_none=True)
actor_url = fields.String()
server = fields.String(metadata={"example": "mastodon.example"})
since = fields.DateTime(metadata={"description": "When they followed (or asked to)"})
class FollowerListArgsSchema(Schema):
state = fields.String(load_default=None, validate=validate.OneOf(["pending", "accepted"]))
class BlockSchema(Schema):
id = fields.Integer()
handle = fields.String()
display_name = fields.String(allow_none=True)
actor_url = fields.String()
since = fields.DateTime()