Add per-app ActivityPub actors via shared AP blueprint

Each AP-enabled app (blog, market, events, federation) now serves its
own webfinger, actor profile, inbox, outbox, and followers endpoints.
Per-app actors are virtual projections of the same ActorProfile/keypair,
scoped by APFollower.app_domain and APActivity.origin_app.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-23 19:02:30 +00:00
parent 001cbffd74
commit f2262f702b
10 changed files with 1087 additions and 35 deletions

View File

@@ -221,7 +221,7 @@ class StubFederationService:
async def get_activity(self, session, activity_id):
return None
async def get_outbox(self, session, username, page=1, per_page=20):
async def get_outbox(self, session, username, page=1, per_page=20, origin_app=None):
return [], 0
async def get_activity_for_source(self, session, source_type, source_id):
@@ -230,14 +230,15 @@ class StubFederationService:
async def count_activities_for_source(self, session, source_type, source_id, *, activity_type):
return 0
async def get_followers(self, session, username):
async def get_followers(self, session, username, app_domain=None):
return []
async def add_follower(self, session, username, follower_acct, follower_inbox,
follower_actor_url, follower_public_key=None):
follower_actor_url, follower_public_key=None,
app_domain=None):
raise RuntimeError("FederationService not available")
async def remove_follower(self, session, username, follower_acct):
async def remove_follower(self, session, username, follower_acct, app_domain=None):
return False
async def get_or_fetch_remote_actor(self, session, actor_url):