eleven / messenger Public

server: setup-invite follows the mesh — public-path fallback like the create mint (#1345)

'lchat setup-invite <host>' only dialed the local socket, so a space owned
by a mesh peer (or just asleep there) answered 'no such file or directory'
— hit re-minting vmb.11ch.at's link this morning. Same fallback the create
path grew in #1337: on socket failure, mint through the public router hop,
which wakes the instance wherever it lives; the replicated env means it
holds the same admin token.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Paul Campbell 293b68a4eff40c5f28cbf4a351da68c2e2f0b11a parent 250f7a1
1 file changed, +10 −1
  • setup_invite.go +10 −1
diff --git a/setup_invite.go b/setup_invite.go
index eefee52..516ecf0 100644
--- a/setup_invite.go
+++ b/setup_invite.go
@@ -135,7 +135,16 @@ func runSetupInvite(args []string) {
socket := filepath.Join(instanceSocketDir, host+".sock")
link, err := mintSetupInvite(socketClient(socket), "http://lchat", "https://"+host, tok)
if err != nil {
- die("setup-invite: %v", err)
+ // A hibernating instance may live (or be asleep) on a mesh peer — the
+ // local socket then has nobody behind it, ever. Same fallback the
+ // create path uses (control.go): mint through the public router hop,
+ // which wakes the instance on whichever box owns it; the replicated
+ // env means it holds this same admin token.
+ pubLink, perr := mintPublicSetupInvite(host, tok)
+ if perr != nil {
+ die("setup-invite: socket: %v; public: %v", err, perr)
+ }
+ link = pubLink
}
fmt.Println(link)
}