diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/app.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/app.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js index ea4cee6..195660c 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/app.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js @@ -17,7 +17,7 @@ import { _storeBundleKey, _loadBundleKey, _clearKeyDB, loadAuth, saveAuth, setAuth, setAuthChangeListener, ensureFreshToken, hubFetch, refreshAccessToken, logoutOnHub, - mirrorBrowserAccess, + mirrorBrowserAccess, linkedNodeKeys, } from './hub-client.js'; import { startIdleWatch, markActive } from './idle.js'; import { GroupPage } from './group-page.js'; @@ -1089,8 +1089,8 @@ function App() { if (!user || !platform.capabilities.nodeAdmin) return; // A late answer, or a retry, must not land on a session that has changed. const current = () => nodeKeyAskedForRef.current === user; - const ask = (attempt) => hubFetch(`/v1/users/${user.username}/pubkeys`, { token: user.token }) - .then(data => { if (current()) setHasNodeKey(Boolean(data.pk_node_ed25519)); }) + const ask = (attempt) => linkedNodeKeys(user.token) + .then(data => { if (current()) setHasNodeKey(Boolean(data.keys && data.keys.length)); }) .catch(() => { if (attempt < 3 && current()) setTimeout(() => ask(attempt + 1), 2000 * attempt); }); |