feat(federation): add client peering integration, transparency indicator, and admin federation settings

Task 13: Hook server-to-server peering into connectToRemote (non-fatal)
and add federation API namespace to the client (initiate, peers, revoke).

Task 14: Show a transparency notice in the DM welcome header when the
other user is on a remote instance, informing that messages are stored
on both home instances and are not end-to-end encrypted.

Task 15: Add Federation section to the instance settings General panel
with DM relay toggle, TTL config, and a live peer list with revoke
buttons. Also extends InstanceAdminSettings type and the server settings
route to support federationRelayEnabled / federationRelayTtlDays.
This commit is contained in:
Jannis Braun
2026-03-25 21:47:10 +01:00
parent 3898e4940a
commit 44de9b6f41
6 changed files with 215 additions and 2 deletions
+7
View File
@@ -289,6 +289,13 @@ export const useInstanceStore = create<InstanceState>((set, get) => ({
});
}
// Initiate server-to-server peering for DM relay (non-fatal)
try {
await api.federation.initiatePeering({ remoteOrigin: origin });
} catch (err) {
console.warn('[federation] Peering initiation failed (non-fatal):', err);
}
// Sync instance list to all instances (fire-and-forget)
get().syncInstanceList().catch(() => {});
} catch (err) {