fix(federation): auto-peering on reconnect and DM deduplication across origins

This commit is contained in:
Jannis Braun
2026-03-26 03:59:59 +01:00
parent b34732e064
commit 73a4b69fe6
2 changed files with 39 additions and 1 deletions
+3
View File
@@ -651,6 +651,9 @@ export const useInstanceStore = create<InstanceState>((set, get) => ({
syncProfileToRemote(connectedInstance).catch((err) => {
console.warn(`[ProfileSync] Reconnect sync to ${origin} failed:`, err);
});
// Initiate server-to-server peering for DM relay (non-fatal, idempotent)
api.federation.initiatePeering({ remoteOrigin: origin }).catch(() => {});
} catch (err) {
if (isNetworkError(err)) {
// Instance unreachable (NAT hairpinning, DNS, server down) — token may still be valid