summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-28 11:32:40 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-28 11:32:40 +0200
commit6b838593d975792ac4fcbd49176089aecc7512e9 (patch)
treebc59da5a0e83576f5c3e10a96be159c60930798e /assets
parent7deaf64678eb755e317d326b9941cc10a4996325 (diff)
downloadmeshbay-6b838593d975792ac4fcbd49176089aecc7512e9.tar.gz
fix(node): a pinned device can be invited to a further invite-only group
Regression from device linking (Stage C, 2026-08-18). Once a device is pinned on a node — as a member of one group, or an operator pairing — the `known` fast-path in `_do_join_request` dropped straight into `_join_ok`. For any *other* invite-only group it had no roster row for, that answered `not_authorized_for_group` and stopped there: the client never got `code_required`, so the pairing-code form never appeared and a legitimately invited member could not join. The `known` branch now, when there is no membership for the group being opened: - with a valid code → consumes the invite and admits (as the unknown- device path already does); - with no code but an invite waiting for this user here → `code_required`, so the client prompts; - with no code and nothing inviting them → `not_authorized_for_group`, unchanged, so the H3 guarantee (a hub-invented pin gets no key) holds. Also fixed: the group's own roster row is now consulted first, so an existing member opening their group is never mistaken for a stranger. Tests in test_roster_pairing.py cover all three branches plus the H3 guard. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018gKJ85aZyvEwarXMFzFEwi
Diffstat (limited to 'assets')
0 files changed, 0 insertions, 0 deletions