aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/group-page.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/group-page.js23
1 files changed, 10 insertions, 13 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
index fcb905b..d2259b9 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
@@ -249,7 +249,7 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
// it is asked for with that token. Persisted so this browser is set up
// from now on.
const { pepper, version } = await window.MeshBayKeys.fetchBundlePepper(token);
- session.bundleKey = await window.MeshBayKeys.deriveBundleSessionKey(
+ session.bundleKey = await window.MeshBayKeys.sessionBundleKey(
pass, username, userId, pepper, version);
await _storeBundleKey(session.bundleKey);
setPassInput('');
@@ -509,18 +509,15 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
};
setOperatorPaired(transport.memberRole === 'operator');
- // A first join to this node generated an identity for it; leave it with
- // the node so any other browser can become the same person here with the
- // passphrase. It is this node's key and no other's.
- if (transport.connected && transport.newNodeBundle) {
- try {
- await transport.storeKeypairBundle(
- transport.newNodeBundle, transport.newNodeBundleRecovery);
- transport.newNodeBundle = null;
- transport.newNodeBundleRecovery = null;
- } catch (e) {
- console.warn('[MeshBay] could not leave our key with the node:', e.message);
- }
+ // What this node should hold of our identity: the bundle of one just
+ // created, so another browser can become the same person here — or, in
+ // the desktop application, whatever the account's browser access says.
+ // Not awaited: nothing on this page depends on it, and the group opens
+ // without waiting for a round trip to the node about a backup.
+ if (transport.connected) {
+ transport.settleNodeBundle().catch((e) => {
+ console.warn('[MeshBay] could not settle our key with the node:', e.message);
+ });
}
// Import GEK from transport (fetched from node during handshake)