feat: add PATCH /federation/me/also-known-as endpoint
Some checks failed
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (push) Has been cancelled

Adds alsoKnownAs column to users table (migration 013), reads it in
the AP actor JSON, and exposes PATCH /federation/me/also-known-as to
set or clear it. Required pre-condition for broadcast_move.
This commit is contained in:
2026-05-28 01:59:35 +02:00
parent 23a8444b5c
commit 1ad02e0806
8 changed files with 92 additions and 11 deletions

View File

@@ -83,6 +83,11 @@ pub trait UserWriter: Send + Sync {
user_id: &UserId,
input: UpdateProfileInput,
) -> Result<(), DomainError>;
async fn set_also_known_as(
&self,
user_id: &UserId,
value: Option<String>,
) -> Result<(), DomainError>;
}
/// Combined supertrait — `AppState.users` stays `Arc<dyn UserRepository>`.

View File

@@ -152,6 +152,14 @@ impl UserWriter for TestStore {
}
Ok(())
}
async fn set_also_known_as(
&self,
_user_id: &UserId,
_value: Option<String>,
) -> Result<(), DomainError> {
Ok(())
}
}
#[async_trait]