feat: signed actor lookup and display_name on DbActor

Add display_name field to DbActor, populated from AP Person.name in
from_json. Expose LookedUpActor type and lookup_actor_by_handle method
on ActivityPubService — uses the existing signed webfinger_https path
so strict instances (Threads, etc.) return full actor data.
This commit is contained in:
2026-05-27 22:21:58 +02:00
parent 7901b29f7c
commit bc857b2c08
5 changed files with 51 additions and 2 deletions

View File

@@ -7,6 +7,24 @@ pub struct ApProfileField {
pub value: String,
}
/// Resolved actor data returned by [`crate::service::ActivityPubService::lookup_actor_by_handle`].
/// Fetched via a signed HTTP request so strict instances (e.g. Threads) return full data.
#[derive(Debug, Clone)]
pub struct LookedUpActor {
pub handle: String,
pub display_name: Option<String>,
pub bio: Option<String>,
pub avatar_url: Option<Url>,
pub banner_url: Option<Url>,
pub ap_url: Url,
pub outbox_url: Url,
pub followers_url: Url,
pub following_url: Url,
pub also_known_as: Option<String>,
pub profile_url: Option<Url>,
pub attachment: Vec<ApProfileField>,
}
#[derive(Debug, Clone)]
pub struct ApUser {
pub id: uuid::Uuid,