findfamily: move relay and share links to api.maproj.org
- Commit
78011dd92670f1f24fcbea882f7e72ef947efd20- Author
- vayun-mathur <[email protected]>
- When
- 2026-10-28 19:17 UTC (1 month ago)
- Parents
71d007c
Diff
findfamily/src/main/java/com/vayunmathur/findfamily/data/TemporaryLink.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/data/TemporaryLink.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/data/TemporaryLink.ktindex 1c03a9d65c..e3182456e1 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/data/TemporaryLink.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/data/TemporaryLink.kt@@ -9,7 +9,7 @@ import kotlin.time.Instant /** * A link id is the server-side *recipient id* — it is what `/api/location/publish` addresses- * and what the `findfamily.cc/view/<id>` URL resolves to — and it shares that namespace with+ * and what the share-link `/view/<id>` URL resolves to — and it shares that namespace with * [com.vayunmathur.findfamily.data.User] ids, which are random 64-bit values. * * So it must be globally unique, not a per-device row number: with Room's `autoGenerate` every
findfamily/src/main/java/com/vayunmathur/findfamily/intents/CreateLinkIntent.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/intents/CreateLinkIntent.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/intents/CreateLinkIntent.ktindex fe1db88912..58f6b3cb36 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/intents/CreateLinkIntent.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/intents/CreateLinkIntent.kt@@ -41,6 +41,6 @@ class CreateLinkIntent : AssistantIntent<CreateLinkData, String>( // The id is generated with the link (newTemporaryLinkId), not handed back by the // insert, so read it off the entity — @Upsert returns -1 on the update path. // Must match the URL format produced by TemporaryLinkCard in MainPage.- return "https://findfamily.cc/view/${link.id.encodeBase26()}#s=${linkKey.seedB64Url}"+ return "${Networking.SHARE_BASE}/${link.id.encodeBase26()}#s=${linkKey.seedB64Url}" } }
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.ktindex 7cf16b854e..6c609fae49 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageActions.kt@@ -177,8 +177,8 @@ internal fun rememberMainPageActions( // SMS; links minted before that still carry their full private bundle. val seed = link.pqcSeed platform.copy(- if (seed != null) "https://findfamily.cc/view/${link.id.encodeBase26()}#s=$seed"- else "https://findfamily.cc/view/${link.id}#pqc_key=${link.pqcKey}"+ if (seed != null) "${Networking.SHARE_BASE}/${link.id.encodeBase26()}#s=$seed"+ else "${Networking.SHARE_BASE}/${link.id}#pqc_key=${link.pqcKey}" ) } }
findfamily/src/main/java/com/vayunmathur/findfamily/util/Networking.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/util/Networking.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/util/Networking.ktindex 6290a4bb84..2ee1458ec6 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/util/Networking.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/util/Networking.kt@@ -36,7 +36,7 @@ import kotlin.time.Clock /** * FindFamily networking — **WebSocket only**. Every server interaction (register, * key lookup, publish, receive) rides one persistent binary socket at- * `wss://findfamily.cc/api/ws`; there are deliberately no HTTP requests and no+ * `wss://api.maproj.org/api/ws`; there are deliberately no HTTP requests and no * HTTP fallback. If the socket drops, [startLive] reconnects (1s→15s backoff) and * re-registers on connect. *@@ -49,6 +49,13 @@ object Networking { internal const val TAG = "FF-Networking" private const val PLATFORM = "android" + /**+ * Base for recipient share links (`$SHARE_BASE/<base26-id>#s=<seed>`).+ * Served by the same `/view/:id` route that `findfamily.cc` serves, so+ * links minted on either host resolve identically.+ */+ internal const val SHARE_BASE = "https://api.maproj.org/view"+ internal val json = Json { ignoreUnknownKeys = true } /** Shared end-to-end-encryption identity (key generation/storage/crypto lives in :library:e2ee-p2p). */