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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user