zalo-agent-cli 1.0.22 → 1.0.23
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/README.md +1 -0
- package/package.json +1 -1
- package/src/commands/group.js +12 -0
package/README.md
CHANGED
|
@@ -201,6 +201,7 @@ zalo-agent whoami
|
|
|
201
201
|
| `group add-member <groupId> <userIds...>` | Add members |
|
|
202
202
|
| `group remove-member <groupId> <userIds...>` | Remove members |
|
|
203
203
|
| `group rename <groupId> <name>` | Rename |
|
|
204
|
+
| `group upgrade-community <groupId>` | Upgrade group to Zalo Community |
|
|
204
205
|
| `group leave <groupId>` | Leave group |
|
|
205
206
|
| `group join <link>` | Join via invite link |
|
|
206
207
|
|
package/package.json
CHANGED
package/src/commands/group.js
CHANGED
|
@@ -171,6 +171,18 @@ export function registerGroupCommands(program) {
|
|
|
171
171
|
}
|
|
172
172
|
});
|
|
173
173
|
|
|
174
|
+
group
|
|
175
|
+
.command("upgrade-community <groupId>")
|
|
176
|
+
.description("Upgrade a group to Zalo Community (requires verified 18+ account)")
|
|
177
|
+
.action(async (groupId) => {
|
|
178
|
+
try {
|
|
179
|
+
const result = await getApi().upgradeGroupToCommunity(groupId);
|
|
180
|
+
output(result, program.opts().json, () => success("Group upgraded to community"));
|
|
181
|
+
} catch (e) {
|
|
182
|
+
error(`Upgrade failed: ${e.message}`);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
|
|
174
186
|
group
|
|
175
187
|
.command("leave <groupId>")
|
|
176
188
|
.description("Leave a group")
|