feat(federation): enrich RemoteActor with bio, banner, followers/following URLs
Some checks failed
lint / lint (push) Failing after 9m25s
test / unit (push) Has been cancelled

Bumps k-ap to 0.3.1 which adds bio, banner_url, followers_url,
following_url, and also_known_as to RemoteActor. These are populated
from fetched actor JSON at follow/ingest time so followers and following
listings no longer return null profile fields.

Adds migration 015 for the new remote_actors columns, updates all JOIN
queries in postgres-federation to select and return the new fields, and
maps them through k_ap_actor_to_domain.

Also fixes clippy: remove empty line after doc comment in port.rs.
This commit is contained in:
2026-05-29 04:07:52 +02:00
parent bd370776fe
commit 5b4b747dd7
10 changed files with 151 additions and 262 deletions

View File

@@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
k-ap = { version = "0.3.0", registry = "gitea" }
k-ap = { version = "0.3.1", registry = "gitea" }
domain = { workspace = true }
url = { workspace = true }
serde = { workspace = true }

View File

@@ -73,7 +73,6 @@ pub trait ActivityPubRepository: Send + Sync {
// ── Inbox processing (remote → local) ───────────────────────────
/// Persist an incoming remote Note. Idempotent on ap_id.
async fn accept_note(&self, input: AcceptNoteInput<'_>) -> Result<ThoughtId, DomainError>;
/// Apply an Update to a previously accepted remote Note.

View File

@@ -114,11 +114,11 @@ fn k_ap_actor_to_domain(a: k_ap::RemoteActor) -> DomainRemoteActor {
avatar_url: a.avatar_url,
outbox_url: a.outbox_url,
last_fetched_at: chrono::Utc::now(),
bio: None,
banner_url: None,
also_known_as: None,
followers_url: None,
following_url: None,
bio: a.bio,
banner_url: a.banner_url,
also_known_as: a.also_known_as.into_iter().next(),
followers_url: a.followers_url,
following_url: a.following_url,
attachment: vec![],
}
}