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:
@@ -4,7 +4,8 @@ use anyhow::Context;
|
||||
use domain::ports::{
|
||||
DiaryRepository, ImageRefCommand, ImageRefQuery, ImportProfileRepository,
|
||||
ImportSessionRepository, MovieProfileRepository, MovieRepository, PersonCommand, PersonQuery,
|
||||
ReviewRepository, SearchCommand, SearchPort, StatsRepository, UserRepository, WatchlistRepository,
|
||||
ReviewRepository, SearchCommand, SearchPort, StatsRepository, UserProfileFieldsRepository,
|
||||
UserRepository, WatchlistRepository,
|
||||
};
|
||||
|
||||
pub enum DbPool {
|
||||
@@ -30,6 +31,7 @@ pub struct Repos {
|
||||
pub person_query: Arc<dyn PersonQuery>,
|
||||
pub search_command: Arc<dyn SearchCommand>,
|
||||
pub search_port: Arc<dyn SearchPort>,
|
||||
pub profile_fields: Arc<dyn UserProfileFieldsRepository>,
|
||||
}
|
||||
|
||||
pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<(Repos, DbPool)> {
|
||||
@@ -41,10 +43,12 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<(Repos
|
||||
let (image_ref_command, image_ref_query) = postgres::create_image_ref(pool.clone());
|
||||
let (person_command, person_query) = postgres::create_person_adapter(pool.clone());
|
||||
let (search_command, search_port) = postgres_search::create_search_adapter(pool.clone());
|
||||
let pf = postgres::create_profile_fields_repo(pool.clone());
|
||||
Ok((Repos { movie: m, review: r, diary: d, stats: s, user: u,
|
||||
import_session: is, import_profile: ip, movie_profile: mp, watchlist: wl,
|
||||
image_ref_command, image_ref_query,
|
||||
person_command, person_query, search_command, search_port },
|
||||
person_command, person_query, search_command, search_port,
|
||||
profile_fields: pf },
|
||||
DbPool::Postgres(pool)))
|
||||
}
|
||||
#[cfg(feature = "sqlite")]
|
||||
@@ -54,10 +58,12 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<(Repos
|
||||
let (image_ref_command, image_ref_query) = sqlite::create_image_ref(pool.clone());
|
||||
let (person_command, person_query) = sqlite::create_person_adapter(pool.clone());
|
||||
let (search_command, search_port) = sqlite_search::create_search_adapter(pool.clone());
|
||||
let pf = sqlite::create_profile_fields_repo(pool.clone());
|
||||
Ok((Repos { movie: m, review: r, diary: d, stats: s, user: u,
|
||||
import_session: is, import_profile: ip, movie_profile: mp, watchlist: wl,
|
||||
image_ref_command, image_ref_query,
|
||||
person_command, person_query, search_command, search_port },
|
||||
person_command, person_query, search_command, search_port,
|
||||
profile_fields: pf },
|
||||
DbPool::Sqlite(pool)))
|
||||
}
|
||||
#[cfg(not(feature = "sqlite"))]
|
||||
|
||||
Reference in New Issue
Block a user