openzca 0.1.43 → 0.1.45

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 CHANGED
@@ -36,8 +36,9 @@ openzca msg send USER_ID "Hello"
36
36
  # Send to a group
37
37
  openzca msg send GROUP_ID "Hello team" --group
38
38
 
39
- # Mention a group member by display name or username
39
+ # Mention a group member by display name, username, or member id
40
40
  openzca msg send GROUP_ID "Hi @Alice Nguyen" --group
41
+ openzca msg send GROUP_ID "Hi @123456789" --group
41
42
 
42
43
  # Listen for incoming messages
43
44
  openzca listen
@@ -83,7 +84,7 @@ You can also open the saved file manually (for example: `open qr.png` on macOS).
83
84
 
84
85
  Media commands accept local files, `file://` paths, and repeatable `--url` options. Add `--group` for group threads.
85
86
  Local paths using `~` are expanded automatically (for positional file args, `--url`, and `OPENZCA_LISTEN_MEDIA_DIR`).
86
- Group text sends via `openzca msg send --group` resolve unique `@Name` mentions against the current group member list using display names and usernames. Mention offsets are computed after formatting markers are parsed, so messages like `**@Alice Nguyen** hello` work. If multiple members share the same label, the command fails instead of guessing.
87
+ Group text sends via `openzca msg send --group` resolve unique `@Name` or `@userId` mentions against the current group member list using member ids, display names, and usernames. Mention offsets are computed after formatting markers are parsed, so messages like `**@Alice Nguyen** hello` work. If multiple members share the same label, the command fails instead of guessing.
87
88
 
88
89
  ### Debug Logging
89
90
 
package/dist/cli.js CHANGED
@@ -642,7 +642,7 @@ function buildCandidates(members) {
642
642
  for (const member of members) {
643
643
  const userId = member.userId.trim();
644
644
  if (!userId) continue;
645
- for (const rawLabel of [member.displayName, member.zaloName]) {
645
+ for (const rawLabel of [member.userId, member.displayName, member.zaloName]) {
646
646
  const label = rawLabel?.trim();
647
647
  if (!label) continue;
648
648
  const normalizedLabel = label.toLowerCase();
@@ -692,7 +692,7 @@ var TAG_STYLE_MAP = {
692
692
  orange: TextStyle.Orange,
693
693
  yellow: TextStyle.Yellow,
694
694
  green: TextStyle.Green,
695
- small: TextStyle.Small,
695
+ small: null,
696
696
  big: TextStyle.Big,
697
697
  underline: TextStyle.Underline
698
698
  };
@@ -740,8 +740,6 @@ function parseTextStyles(input) {
740
740
  lineStyles.push({ lineIndex, style: TextStyle.Bold });
741
741
  if (depth === 1) {
742
742
  lineStyles.push({ lineIndex, style: TextStyle.Big });
743
- } else if (depth === 3 || depth === 4) {
744
- lineStyles.push({ lineIndex, style: TextStyle.Small });
745
743
  }
746
744
  processedLines.push(headingMatch[2]);
747
745
  continue;
@@ -3329,7 +3327,7 @@ auth.command("cache-clear").description("Clear local cache").action(
3329
3327
  })
3330
3328
  );
3331
3329
  var msg = program.command("msg").description("Messaging commands");
3332
- msg.command("send <threadId> <message>").option("-g, --group", "Send to group").option("--raw", "Send raw text without parsing formatting markers").description("Send text message with formatting (**bold** *italic* __bold__ ~~strike~~ {underline}text{/underline} {red}color{/red} {big}size{/big} lists indents). Group sends also resolve unique @Name mentions.").action(
3330
+ msg.command("send <threadId> <message>").option("-g, --group", "Send to group").option("--raw", "Send raw text without parsing formatting markers").description("Send text message with formatting (**bold** *italic* __bold__ ~~strike~~ {underline}text{/underline} {red}color{/red} {big}size{/big} lists indents). Group sends also resolve unique @Name/@userId mentions.").action(
3333
3331
  wrapAction(async (threadId, message, opts, command) => {
3334
3332
  const { api } = await requireApi(command);
3335
3333
  const threadType = asThreadType(opts.group);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openzca",
3
- "version": "0.1.43",
3
+ "version": "0.1.45",
4
4
  "description": "Open-source zca-compatible CLI to integrate Zalo with OpenClaw",
5
5
  "type": "module",
6
6
  "bin": {