feat: feature flags

This commit is contained in:
2026-05-10 02:26:18 +02:00
parent 597685520c
commit ebf74a59fd
10 changed files with 399 additions and 209 deletions

View File

@@ -125,7 +125,9 @@ impl domain::ports::DiaryExporter for PanicExporter {
}
}
#[cfg(feature = "federation")]
struct PanicSocialQuery;
#[cfg(feature = "federation")]
#[async_trait::async_trait]
impl domain::ports::SocialQueryPort for PanicSocialQuery {
async fn get_accepted_following_urls(
@@ -171,7 +173,9 @@ async fn test_app() -> Router {
},
html_renderer: Arc::new(AskamaHtmlRenderer::new()),
rss_renderer: Arc::new(RssAdapter::new("http://localhost:3000".into())),
#[cfg(feature = "federation")]
ap_service: Arc::new(activitypub::NoopActivityPubService),
#[cfg(feature = "federation")]
social_query: Arc::new(PanicSocialQuery),
};