feat(ap): broadcast Update(Actor) when user updates their profile
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user