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