feat: v2 rewrite — hexagonal arch, ActivityPub federation, NATS, deployment-ready #1

Merged
GKaszewski merged 334 commits from v2 into master 2026-05-16 09:42:43 +00:00
2 changed files with 12 additions and 0 deletions
Showing only changes of commit 57110f3b75 - Show all commits

View File

@@ -198,6 +198,7 @@ pub trait RemoteActorRepository: Send + Sync {
pub trait FederationActionPort: Send + Sync {
async fn lookup_actor(&self, handle: &str) -> Result<RemoteActor, DomainError>;
async fn follow_remote(&self, local_user_id: &UserId, handle: &str) -> Result<(), DomainError>;
async fn actor_json(&self, user_id: &UserId) -> Result<String, DomainError>;
}
#[async_trait]

View File

@@ -547,6 +547,10 @@ impl FederationActionPort for TestStore {
) -> Result<(), DomainError> {
Ok(())
}
async fn actor_json(&self, _user_id: &UserId) -> Result<String, DomainError> {
Err(DomainError::NotFound)
}
}
#[async_trait]
@@ -806,6 +810,13 @@ mod federation_port_tests {
.await
.unwrap();
}
#[tokio::test]
async fn test_store_actor_json_returns_not_found() {
let store = TestStore::default();
let err = store.actor_json(&UserId::new()).await.unwrap_err();
assert!(matches!(err, DomainError::NotFound));
}
}
#[cfg(test)]