Remove federation functionality and related tests
- Deleted the `federation.rs` module and its associated functionality for federating thoughts to followers. - Removed the `well_known.rs` module and its WebFinger discovery functionality. - Eliminated references to federation in the `thought.rs` router and removed the spawning of background tasks for federating thoughts. - Deleted tests related to WebFinger and user inbox interactions in `activitypub.rs`. - Updated `Cargo.toml` to remove the `activitypub_federation` dependency.
This commit is contained in:
@@ -20,7 +20,6 @@ use sea_orm::prelude::Uuid;
|
||||
use crate::{
|
||||
error::ApiError,
|
||||
extractor::{AuthUser, Json, OptionalAuthUser, Valid},
|
||||
federation,
|
||||
models::{ApiErrorResponse, ParamsErrorResponse},
|
||||
};
|
||||
|
||||
@@ -77,13 +76,6 @@ async fn thoughts_post(
|
||||
.await?
|
||||
.ok_or(UserError::NotFound)?; // Should not happen if auth is valid
|
||||
|
||||
// Spawn a background task to handle federation without blocking the response
|
||||
tokio::spawn(federation::federate_thought(
|
||||
state.clone(),
|
||||
thought.clone(),
|
||||
author.clone(),
|
||||
));
|
||||
|
||||
let schema = ThoughtSchema::from_models(&thought, &author);
|
||||
Ok((StatusCode::CREATED, Json(schema)))
|
||||
}
|
||||
|
Reference in New Issue
Block a user