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:
18
src/user.rs
18
src/user.rs
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user