fix: clean up replicatedInstances and registry on federation identity deletion

After deleting a federated identity, the server-side user_federation_registry
and users.replicated_instances were not cleaned up, causing "already connected"
errors when trying to re-federate. The deletion endpoint now authoritatively
removes both the registry row and the replicatedInstances entry, and bumps the
LWW timestamp to prevent stale client syncs from re-inserting them.

Also extends the endpoint to accept mode 'leave' (skip S2S, just clean up),
and enables the "Select instances..." scope option in DeleteIdentityDialog.
This commit is contained in:
Jannis Braun
2026-04-03 04:56:25 +02:00
parent 58c6ec1dc6
commit 02a44c201d
4 changed files with 129 additions and 65 deletions
+1 -1
View File
@@ -710,7 +710,7 @@ export interface DeleteAccountRequest {
export interface FederationIdentityDeleteRequest {
origins: string[];
mode: 'soft' | 'full';
mode: 'leave' | 'soft' | 'full';
}
export interface FederationIdentityDeleteResult {