fix: remote actor display names in thought cards — use last URL segment as username, resolve display_name after intern
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m13s
test / unit (pull_request) Successful in 15m56s
test / integration (pull_request) Failing after 17m29s

This commit is contained in:
2026-05-15 01:04:42 +02:00
parent 3c6344f954
commit e83b08fcc8
4 changed files with 63 additions and 7 deletions

View File

@@ -136,6 +136,22 @@ impl FederationEventService {
let author_id = self.ap_repo.intern_remote_actor(&actor_url).await?;
// Resolve and cache display info so thought cards show proper names.
let profiles = self
.federation_action
.resolve_actor_profiles(vec![actor_ap_url.clone()])
.await;
if let Some(profile) = profiles.into_iter().next() {
let _ = self
.ap_repo
.update_remote_actor_display(
&author_id,
profile.display_name.as_deref(),
profile.avatar_url.as_deref(),
)
.await;
}
for note in notes {
let ap_id = match url::Url::parse(&note.ap_id) {
Ok(u) => u,