garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

cartopolis-agent · 2026-11-28T18:15:52Z

docs(notes): links name the server they were made on
docs/notes/chat-across-servers.md |  8 +++++---
 docs/notes/communities.md         |  3 ++-
 docs/notes/contacts.md            |  2 ++
 docs/notes/place-links.md         | 25 +++++++++++++++++++++++++
 4 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/docs/notes/chat-across-servers.md b/docs/notes/chat-across-servers.md
index dbf28c4a..fc480745 100644
--- a/docs/notes/chat-across-servers.md
+++ b/docs/notes/chat-across-servers.md
@@ -109,12 +109,14 @@ on one machine (`people_on_two_servers_call_each_other_on_the_chats_hub`).
   **removing a contact** across servers, presence and "where" of contacts
   elsewhere, and the rest of calls (above). Each is named in the design's
   stage 5.
-- **Contact links** are `https://cartopolis.org/go?contact=…` whatever server
-  made them (`place_link::contact_link`), so a link from a self-hosted server
-  names the wrong one. Typing the full address works.
 - **Server identity and discovery** (stage 2) are still not built: a server is
   `https://<its name>`, and its key is the fediverse's instance actor.
 
+- **An invite link from another server**, opened in the app signed in here,
+  is looked up here and refused: it opens on its own server's web page, and a
+  contact link from there reads as the person's full address
+  (`place-links.md`), but an invite has nothing to join across servers yet.
+
 ## Testing it
 
 `tests/integration/chat_elsewhere.rs` runs two simulators on one machine, named
diff --git a/docs/notes/communities.md b/docs/notes/communities.md
index f6bb6704..d638e385 100644
--- a/docs/notes/communities.md
+++ b/docs/notes/communities.md
@@ -76,7 +76,8 @@ rule, for `COMMUNITY_INVITE_DAYS` (14). Two rules: a person a moderator removed
 *with a block* stays out even with a link, and looking one up
 (`CommunityInviteLookup`) answers the community as a one-entry directory, so an
 unlisted community shows its face to somebody holding its link and nobody
-else. The link is `https://cartopolis.org/go?community=CODE`: on `/go` because
+else. The link is `https://<the server>/go?community=CODE`, naming the server it
+was made on (`place_link::link_origin`, `place-links.md`): on `/go` because
 that is the one path the app claims on Android, so a phone with the app opens
 the app; on the desktop the viewer handles it, and the chat page reads
 `?community=` too and takes a pasted link or code in Find. On Android a link tapped while the app
diff --git a/docs/notes/contacts.md b/docs/notes/contacts.md
index ddf2ff36..77384720 100644
--- a/docs/notes/contacts.md
+++ b/docs/notes/contacts.md
@@ -67,6 +67,8 @@ first would race the request and be refused keys.
 
 `https://cartopolis.org/go?contact=name~code` — the path Android already claims
 and the web client already serves, so it needed no Caddy or manifest change.
+Since 2026-11-28 the host is the server the link was made on, and a link from
+another server reads as that person's full address (`place-links.md`).
 The mockup drew `/u/name`; that would need both. A link lets the holder send a
 request whatever the setting says; *Reset link* issues a new code.
 
diff --git a/docs/notes/place-links.md b/docs/notes/place-links.md
index 77fbc5bb..c5e5631b 100644
--- a/docs/notes/place-links.md
+++ b/docs/notes/place-links.md
@@ -136,6 +136,31 @@ settings would be a link people learn not to follow, and every one of those is
 already persisted per user (`user.json`). "The exact camera" is the whole
 promise.
 
+## Contact and invite links name the server that made them (2026-11-28)
+
+A contact link, a community invite and a call's guest link carry the origin of
+the server the app is signed in to (`place_link::link_origin`, from
+`ConnectAddr`), and the web page's invite its own `location.origin`. A
+self-hosted server's web UI answers `/go` itself (`static_files`, the chat
+page reads `?community=`), so the link opens there; before, every link said
+cartopolis.org and sent people to the wrong server. A server with no address
+worth sharing — loopback, `tcp://`, `ws://`, the web build's empty address —
+keeps `WEB_ORIGIN`.
+
+Reading one back, the host now counts for a contact: `contact_from_link` gives
+`sanne@rug.example` for a link from rug.example, and `Contacts::open_card_for_name`
+turns it back into the bare name on its own server (`address::display` against
+`link_home`), since the server looks a local person up by name only. The
+custom scheme and a loopback page name no server and give the bare name.
+
+**Place links still say cartopolis.org.** On cartopolis.org `/go` is the
+viewer, which flies to `?place=`; on a server of one's own it is the chat page,
+which does not.
+
+**On Android a link to another server opens the browser**, not the app: App
+Links are verified per host (`assetlinks.json` on cartopolis.org only). Pasting
+it in Contacts ▸ Add, or Find for an invite, reads it in the app.
+
 ## Trying it without a phone
 
 ```bash