feat(ap): ActivityPub spec compliance and profile completeness

Phase 1 — spec compliance:
- Add AS_PUBLIC constant; add to/cc fields to CreateActivity, DeleteActivity,
  UpdateActivity, AddActivity; populate on all broadcast call sites
- Add @context to outbox CreateActivity items
- Set manuallyApprovesFollowers: true to match actual Pending follow flow
- Gate PermissiveVerifier behind FEDERATION_DEBUG env var
- Add updated timestamp to Person actor JSON
- Improve actor update delivery logging

Phase 2a Batch 1 — AP layer:
- Add /inbox shared inbox route; add endpoints.sharedInbox to Person
- Paginate followers and following collections (20/page, OrderedCollectionPage)

Phase 2a Batch 2 — profile completeness:
- DB migrations: banner_path, also_known_as columns; user_profile_fields table
- ProfileField value object; UserProfileFieldsRepository port
- Banner image upload (stored via image-converter, surfaced as image in Person)
- alsoKnownAs field in Person (account migration support)
- Custom profile fields (up to 4 PropertyValue attachments in Person)
- Profile settings UI: banner preview/upload, alsoKnownAs input, fields form
- PUT /api/v1/profile/fields API endpoint
This commit is contained in:
2026-05-13 22:21:41 +02:00
parent 0a97fe5544
commit 815178e6a4
56 changed files with 1388 additions and 246 deletions

View File

@@ -72,6 +72,15 @@ async fn wire_dependencies() -> anyhow::Result<(AppState, axum::Router)> {
_ => anyhow::bail!("DATABASE_BACKEND={backend} is not supported by this build (sqlite feature is not enabled)"),
};
let profile_fields_repo = match &db_pool {
#[cfg(feature = "postgres")]
DbPool::Postgres(pool) => postgres::create_profile_fields_repo(pool.clone()),
#[cfg(feature = "sqlite")]
DbPool::Sqlite(pool) => sqlite::create_profile_fields_repo(pool.clone()),
#[cfg(not(feature = "sqlite"))]
_ => anyhow::bail!("no profile fields repo for this backend"),
};
// Wire up event channel, federation service, and ap_router
let event_bus = EventBusBackend::from_env()?;
@@ -114,6 +123,7 @@ async fn wire_dependencies() -> anyhow::Result<(AppState, axum::Router)> {
review_store,
remote_watchlist_repo.clone(),
Arc::clone(&user_repository),
Arc::clone(&profile_fields_repo),
Arc::clone(&movie_repository),
Arc::clone(&review_repository),
Arc::clone(&diary_repository),
@@ -173,6 +183,7 @@ async fn wire_dependencies() -> anyhow::Result<(AppState, axum::Router)> {
import_profile_repository: import_profile_repository as Arc<dyn ImportProfileRepository>,
movie_profile_repository,
watchlist_repository,
profile_fields_repository: profile_fields_repo,
#[cfg(feature = "federation")]
remote_watchlist_repository: remote_watchlist_repo,
person_command,