feat: add PATCH /federation/me/also-known-as endpoint

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 fc290dc18f
commit 2445cad1c9
8 changed files with 92 additions and 11 deletions

View File

@@ -60,6 +60,13 @@ impl UserWriter for ConflictOnSaveStore {
) -> Result<(), DomainError> {
self.0.update_profile(user_id, input).await
}
async fn set_also_known_as(
&self,
user_id: &UserId,
value: Option<String>,
) -> Result<(), DomainError> {
self.0.set_also_known_as(user_id, value).await
}
}
#[async_trait]
@@ -105,6 +112,13 @@ impl UserWriter for EmailConflictOnSaveStore {
) -> Result<(), DomainError> {
self.0.update_profile(user_id, input).await
}
async fn set_also_known_as(
&self,
user_id: &UserId,
value: Option<String>,
) -> Result<(), DomainError> {
self.0.set_also_known_as(user_id, value).await
}
}
struct FakeHasher;