diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-01 11:07:05 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-01 11:07:05 +0200 |
| commit | 0443cf8aaab58a54c73d28cafca5d5d8a52605e6 (patch) | |
| tree | 6516fe97240a02c086e1a6b5c1d11313e1555520 /packages/meshbay-hub | |
| parent | b6c15f35d570d4f54901b811654991847502ca82 (diff) | |
| download | meshbay-0443cf8aaab58a54c73d28cafca5d5d8a52605e6.tar.gz | |
fix(node): CLI member invite now registers hub membership and enforces code
Two bugs fixed:
1. `meshbay-node member invite <user>` created a local roster invite
but never told the hub to add the user to group_members, so the
group was invisible in the SPA. The node now calls
POST /v1/groups/{id}/members/{username} after creating the invite,
and the hub endpoint accepts node-scoped tokens (the admin_id
check is the real authorization guard).
2. The WebRTC handshake let a previously-pinned user reconnect without
a code even when a new invite was pending (e.g. after leave + re-invite).
Now any pending invite forces code entry, regardless of existing
member/pin status.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/api/groups.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/api/groups.py b/packages/meshbay-hub/src/meshbay_hub/api/groups.py index fcf0360..fdb0444 100644 --- a/packages/meshbay-hub/src/meshbay_hub/api/groups.py +++ b/packages/meshbay-hub/src/meshbay_hub/api/groups.py @@ -586,7 +586,7 @@ async def update_group( async def add_group_member( group_id: str, username: str, - current_user: User = Depends(require_user_scope), + current_user: User = Depends(get_current_user), db: AsyncSession = Depends(get_db), ): group = await db.get(Group, group_id) |