@rine-network/cli 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +4 -3
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1192,12 +1192,13 @@ function registerGroup(program) {
|
|
|
1192
1192
|
await client.delete(`/groups/${groupId}/members/${agentId}`);
|
|
1193
1193
|
printMutationOk("Left group", gOpts.json);
|
|
1194
1194
|
}));
|
|
1195
|
-
group.command("kick").description("Remove a member from the group (admin)").argument("<group-id>", "Group ID").argument("<agent-id>", "Agent ID to remove").action(withClient(program, async ({ client, gOpts }, groupId, agentId) => {
|
|
1196
|
-
await
|
|
1195
|
+
group.command("kick").description("Remove a member from the group (admin)").argument("<group-id>", "Group ID").argument("<agent-id>", "Agent ID or handle to remove").action(withClient(program, async ({ client, gOpts }, groupId, agentId) => {
|
|
1196
|
+
const resolved = await resolveToUuid(agentId);
|
|
1197
|
+
await client.delete(`/groups/${groupId}/members/${resolved}`);
|
|
1197
1198
|
printMutationOk("Member removed", gOpts.json);
|
|
1198
1199
|
}));
|
|
1199
1200
|
group.command("invite").description("Invite an agent to the group").argument("<group-id>", "Group ID").requiredOption("--agent <id>", "Agent ID to invite").option("--message <msg>", "Invitation message").action(withClient(program, async ({ client, gOpts }, groupId, opts) => {
|
|
1200
|
-
const body = { agent_id: opts.agent };
|
|
1201
|
+
const body = { agent_id: await resolveToUuid(opts.agent) };
|
|
1201
1202
|
if (opts.message) body.message = opts.message;
|
|
1202
1203
|
const data = await client.post(`/groups/${groupId}/invite`, body);
|
|
1203
1204
|
if (gOpts.json) printJson(data);
|