From fcac9dcb6ba0ad346a754c7b9e7c59d38b64a4e8 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 1 Oct 2026 15:52:08 +0200 Subject: fix(client): rotating a group key asks nothing Rotation narrows rather than widens: members still connected receive the new key, and nothing already shared changes. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-client/src/main.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'packages/meshbay-client') diff --git a/packages/meshbay-client/src/main.js b/packages/meshbay-client/src/main.js index dba40b4..c1ff540 100644 --- a/packages/meshbay-client/src/main.js +++ b/packages/meshbay-client/src/main.js @@ -2222,16 +2222,7 @@ function registerBridge() { ejectRoot: (a) => ['PUT', `${root(a)}/eject`], plugRoot: (a) => ['PUT', `${root(a)}/plug`], removeRoot: (a) => ['DELETE', root(a)], - // Creating a missing key replaces nothing -- the node keeps an existing one - // -- so only a rotation is asked about. - initGek: async (a) => { - const target = group(a); - if (a.rotate) { - await confirmOrRefuse('node.gek_rotate_confirm'); - return ['POST', `${target}/gek?rotate=true`]; - } - return ['POST', `${target}/gek`]; - }, + initGek: (a) => ['POST', `${group(a)}/gek${a.rotate ? '?rotate=true' : ''}`], pairOperator: () => ['POST', '/api/operator/pair'], roster: (a) => ['GET', a.groupId ? `/api/roster?group_id=${anId(a.groupId, 'the group')}` : '/api/roster'], -- cgit v1.2.3