From 462d76898a306981fbeac859cd54da1468e80639 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Wed, 7 Oct 2026 22:12:54 +0200 Subject: 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 --- packages/meshbay-node/src/meshbay_node/transport/webrtc/admin.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'packages/meshbay-node/src/meshbay_node/transport/webrtc/admin.py') diff --git a/packages/meshbay-node/src/meshbay_node/transport/webrtc/admin.py b/packages/meshbay-node/src/meshbay_node/transport/webrtc/admin.py index 9a6cbd1..48734ab 100644 --- a/packages/meshbay-node/src/meshbay_node/transport/webrtc/admin.py +++ b/packages/meshbay-node/src/meshbay_node/transport/webrtc/admin.py @@ -157,6 +157,13 @@ class AdminMixin: if ident and not self._device_confirmed: self._pinned_pk = ident["pk_ed25519"] + async def _name_identity(self) -> None: + """Record the token's username for an account the roster has unnamed.""" + roster = self._ctx.get("roster") + if roster is None or not self._user_id or not self._username: + return + await roster.name_identity(self._user_id, self._username) + def _is_node_admin(self) -> bool: """ Whether the **account** on this connection is the one the node belongs to. -- cgit v1.2.3