feat: rename product to Screened, add PRODUCT_NAME constant to domain
This commit is contained in:
@@ -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?,
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user