From 9e679b5902f6b07724e53191e36b6e7b5c47e208 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Wed, 17 Apr 2024 13:05:39 +0200 Subject: [PATCH] Fix default port on hub invites --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index e106693..0fed6b4 100644 --- a/main.js +++ b/main.js @@ -135,10 +135,12 @@ async function writeElements(ev, elements) { async function createInvite() { if (globalAccountID === null) throw new Error('account not loaded') - const { url } = await p(peer.invite.createForFriend)({ + let { url } = await p(peer.invite.createForFriend)({ hubs: 1, id: globalAccountID, }) + // if the hub is on localhost, it's probably on the default port of 3000, so let's make things a bit easier for the user + if (url.indexOf('0.0.0.0') !== -1) url = url.replace("0.0.0.0", "0.0.0.0:3000") return url }