refactor: align message target wording

This commit is contained in:
Peter Steinberger
2026-01-17 04:18:59 +00:00
parent 9a60d431c5
commit 8ebfa2950d
18 changed files with 27 additions and 27 deletions

View File

@@ -11,7 +11,7 @@ export const matrixOutbound: ChannelOutboundAdapter = {
if (!trimmed) {
return {
ok: false,
error: new Error("Delivering to Matrix requires --to <room|alias|user>"),
error: new Error("Delivering to Matrix requires target <room|alias|user>"),
};
}
return { ok: true, to: trimmed };

View File

@@ -15,7 +15,7 @@ export const msteamsOutbound: ChannelOutboundAdapter = {
return {
ok: false,
error: new Error(
"Delivering to MS Teams requires --to <conversationId|user:ID|conversation:ID>",
"Delivering to MS Teams requires target <conversationId|user:ID|conversation:ID>",
),
};
}

View File

@@ -26,7 +26,7 @@ export type MSTeamsProactiveContext = {
};
/**
* Parse the --to argument into a conversation reference lookup key.
* Parse the target value into a conversation reference lookup key.
* Supported formats:
* - conversation:19:abc@thread.tacv2 → lookup by conversation ID
* - user:aad-object-id → lookup by user AAD object ID
@@ -40,7 +40,7 @@ function parseRecipient(to: string): {
const finalize = (type: "conversation" | "user", id: string) => {
const normalized = id.trim();
if (!normalized) {
throw new Error(`Invalid --to value: missing ${type} id`);
throw new Error(`Invalid target value: missing ${type} id`);
}
return { type, id: normalized };
};

View File

@@ -185,7 +185,7 @@ export const zaloPlugin: ChannelPlugin<ResolvedZaloAccount> = {
return "ZALO_BOT_TOKEN can only be used for the default account.";
}
if (!input.useEnv && !input.token && !input.tokenFile) {
return "Zalo requires --token or --token-file (or --use-env).";
return "Zalo requires targetken or --token-file (or --use-env).";
}
return null;
},
@@ -284,7 +284,7 @@ export const zaloPlugin: ChannelPlugin<ResolvedZaloAccount> = {
if (!trimmed) {
return {
ok: false,
error: new Error("Delivering to Zalo requires --to <chatId>"),
error: new Error("Delivering to Zalo requires target <chatId>"),
};
}
return { ok: true, to: trimmed };

View File

@@ -88,7 +88,7 @@ clawdbot channels login --channel zalouser
### Send a Message
```bash
clawdbot message send --channel zalouser --to <threadId> --message "Hello from Clawdbot!"
clawdbot message send --channel zalouser --target <threadId> --message "Hello from Clawdbot!"
```
## Configuration
@@ -152,10 +152,10 @@ zca account label <profile> "Work Account"
```bash
# Text
clawdbot message send --channel zalouser --to <threadId> --message "message"
clawdbot message send --channel zalouser --target <threadId> --message "message"
# Media (URL)
clawdbot message send --channel zalouser --to <threadId> --message "caption" --media-url "https://example.com/img.jpg"
clawdbot message send --channel zalouser --target <threadId> --message "caption" --media-url "https://example.com/img.jpg"
```
### Listener
@@ -188,7 +188,7 @@ Use `--profile` or `-p` to work with multiple accounts:
```bash
clawdbot channels login --channel zalouser --account work
clawdbot message send --channel zalouser --account work --to <id> --message "Hello"
clawdbot message send --channel zalouser --account work --target <id> --message "Hello"
ZCA_PROFILE=work zca listen
```

View File

@@ -378,7 +378,7 @@ export const zalouserPlugin: ChannelPlugin<ResolvedZalouserAccount> = {
if (!trimmed) {
return {
ok: false,
error: new Error("Delivering to Zalouser requires --to <threadId>"),
error: new Error("Delivering to Zalouser requires target <threadId>"),
};
}
return { ok: true, to: trimmed };