fix(meshctrl): use userids instead of usernames in addusertodevicegroup (#7741)
The addusertodevicegroup command sends the --userid value in the 'usernames' field of the addmeshuser websocket command. The server-side handler treats 'usernames' as short username lookups, which fails for full user IDs (e.g. user/domain/~azure:user@example.com). This changes the field to 'userids', which the server resolves correctly by full ID. This matches the behavior of removeuserfromdevicegroup which already uses 'userid' (singular) and works correctly. Fixes #7740
cameronfairbairn committed
Apr 8, 2026 at 20:11 UTC
2a88c7a18c74ee7a26cedcb0cd85bc6580923db3
1 file changed
+1
-1
meshctrl.js
+1
-1
@@ -1659,7 +1659,7 @@ function serverConnect() {
1659
if (args.limitedevents) { meshrights |= 8192; }
1660
if (args.chatnotify) { meshrights |= 16384; }
1661
if (args.uninstall) { meshrights |= 32768; }
1662
- var op = { action: 'addmeshuser', usernames: [args.userid], meshadmin: meshrights, responseid: 'meshctrl' };
1662
+ var op = { action: 'addmeshuser', userids: [args.userid], meshadmin: meshrights, responseid: 'meshctrl' };
1663
if (args.id) { op.meshid = args.id; } else if (args.group) { op.meshname = args.group; }
1664
ws.send(JSON.stringify(op));
1665
break;