feat(ap): broadcast Update(Actor) when user updates their profile

This commit is contained in:
2026-05-15 05:32:25 +02:00
parent d360e506db
commit ca1ebc4b68
7 changed files with 45 additions and 1 deletions

View File

@@ -277,6 +277,10 @@ impl FederationEventService {
.await
}
DomainEvent::ProfileUpdated { user_id } => {
self.ap.broadcast_actor_update(user_id).await
}
_ => Ok(()),
}
}
@@ -308,6 +312,7 @@ mod tests {
undo_announced: Mutex<Vec<String>>,
liked: Mutex<Vec<String>>,
undo_liked: Mutex<Vec<String>>,
actor_updated: Mutex<Vec<UserId>>,
}
#[async_trait]
@@ -366,6 +371,11 @@ mod tests {
self.undo_liked.lock().unwrap().push(ap_id.to_string());
Ok(())
}
async fn broadcast_actor_update(&self, user_id: &UserId) -> Result<(), DomainError> {
self.actor_updated.lock().unwrap().push(user_id.clone());
Ok(())
}
}
fn alice() -> User {