aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-common/src
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-07 22:12:54 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-07 22:20:45 +0200
commit462d76898a306981fbeac859cd54da1468e80639 (patch)
tree9a49723da751b4a7225e3dd37181ecceed192f3a /packages/meshbay-common/src
parent92e6b9823119b5461efc304a81e79e186a928e6d (diff)
downloadmeshbay-462d76898a306981fbeac859cd54da1468e80639.tar.gz
fix(node): name members admitted without an invitation name
A member who joined by link, by a new device or into an open group was pinned in the roster with no name, so the audit log showed only the first characters of their id. The hub's MNP token now carries the account's username, and after the handshake the node writes it into the roster for an account whose name is empty. An invitation's name is never overwritten; the name is a label, authority stays on `sub`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-common/src')
-rw-r--r--packages/meshbay-common/src/meshbay_common/handshake.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/handshake.py b/packages/meshbay-common/src/meshbay_common/handshake.py
index c3d5b94..dad8cdc 100644
--- a/packages/meshbay-common/src/meshbay_common/handshake.py
+++ b/packages/meshbay-common/src/meshbay_common/handshake.py
@@ -343,7 +343,7 @@ def authorize_token(
return AuthorizedPeer(
user_id=user_id,
group_id=group_id,
- username=decoded.get("username", ""),
+ username=str(decoded.get("username") or "")[:64],
jti=jti,
)