feat: rename product to Screened, add PRODUCT_NAME constant to domain

This commit is contained in:
2026-05-12 15:42:24 +02:00
parent 722b09e400
commit f2e3a876dc
9 changed files with 31 additions and 26 deletions

View File

@@ -6,6 +6,8 @@ pub mod review_handler;
pub(crate) mod urls;
pub mod user_adapter;
use domain::PRODUCT_NAME;
// Re-export the generic base types that callers need
pub use activitypub_base::{
ActivityPubService, ApFederationConfig, ApObjectHandler, ApUser, ApUserRepository,
@@ -46,7 +48,7 @@ pub async fn wire(
}),
base_url.clone(),
allow_registration,
"movies-diary".to_string(),
PRODUCT_NAME.to_lowercase(),
cfg!(debug_assertions),
)
.await?,

View File

@@ -69,9 +69,9 @@ pub fn review_to_ap_object(
let tag = vec![
ApHashtag {
kind: "Hashtag".to_string(),
href: Url::parse(&format!("{}/tags/moviesdiary", base_url))
href: Url::parse(&format!("{}/tags/screened", base_url))
.expect("valid base_url"),
name: "#MoviesDiary".to_string(),
name: "#Screened".to_string(),
},
ApHashtag {
kind: "Hashtag".to_string(),
@@ -137,7 +137,7 @@ mod tests {
);
assert_eq!(obj.tag.len(), 2);
let names: Vec<&str> = obj.tag.iter().map(|t| t.name.as_str()).collect();
assert!(names.contains(&"#MoviesDiary"));
assert!(names.contains(&"#Screened"));
assert!(names.contains(&"#Dune"));
}
}