feat: enhance review handling by adding actor URL support across multiple components
All checks were successful
CI / Check / Test (push) Successful in 1h3m53s

This commit is contained in:
2026-06-30 03:34:52 +02:00
parent 9f6ba55afc
commit d7fbf8d9e2
7 changed files with 21 additions and 7 deletions

View File

@@ -4,12 +4,17 @@ use domain::models::FeedEntry;
use super::movies::{movie_to_dto, review_to_dto};
pub fn feed_entry_to_dto(e: &FeedEntry) -> FeedEntryDto {
use domain::models::ReviewSource;
let actor_url = match e.review().source() {
ReviewSource::Remote { actor_url } => Some(actor_url.clone()),
ReviewSource::Local => None,
};
FeedEntryDto {
movie: movie_to_dto(e.movie()),
review: review_to_dto(e.review()),
user_id: e.review().user_id().value(),
user_email: e.user_email().to_string(),
user_display_name: e.user_display_name().to_string(),
is_federated: e.review().is_remote(),
actor_url,
}
}