refactor: align message target wording
This commit is contained in:
@@ -253,7 +253,7 @@ export const discordPlugin: ChannelPlugin<ResolvedDiscordAccount> = {
|
||||
return "DISCORD_BOT_TOKEN can only be used for the default account.";
|
||||
}
|
||||
if (!input.useEnv && !input.token) {
|
||||
return "Discord requires --token (or --use-env).";
|
||||
return "Discord requires targetken (or --use-env).";
|
||||
}
|
||||
return null;
|
||||
},
|
||||
@@ -314,7 +314,7 @@ export const discordPlugin: ChannelPlugin<ResolvedDiscordAccount> = {
|
||||
if (!trimmed) {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error("Delivering to Discord requires --to <channelId|user:ID|channel:ID>"),
|
||||
error: new Error("Delivering to Discord requires target <channelId|user:ID|channel:ID>"),
|
||||
};
|
||||
}
|
||||
return { ok: true, to: trimmed };
|
||||
|
||||
@@ -177,7 +177,7 @@ export const imessagePlugin: ChannelPlugin<ResolvedIMessageAccount> = {
|
||||
if (!trimmed) {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error("Delivering to iMessage requires --to <handle|chat_id:ID>"),
|
||||
error: new Error("Delivering to iMessage requires target <handle|chat_id:ID>"),
|
||||
};
|
||||
}
|
||||
return { ok: true, to: trimmed };
|
||||
|
||||
@@ -11,7 +11,7 @@ export const discordOutbound: ChannelOutboundAdapter = {
|
||||
if (!trimmed) {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error("Delivering to Discord requires --to <channelId|user:ID|channel:ID>"),
|
||||
error: new Error("Delivering to Discord requires target <channelId|user:ID|channel:ID>"),
|
||||
};
|
||||
}
|
||||
return { ok: true, to: trimmed };
|
||||
|
||||
@@ -12,7 +12,7 @@ export const imessageOutbound: ChannelOutboundAdapter = {
|
||||
if (!trimmed) {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error("Delivering to iMessage requires --to <handle|chat_id:ID>"),
|
||||
error: new Error("Delivering to iMessage requires target <handle|chat_id:ID>"),
|
||||
};
|
||||
}
|
||||
return { ok: true, to: trimmed };
|
||||
|
||||
@@ -13,7 +13,7 @@ export const signalOutbound: ChannelOutboundAdapter = {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error(
|
||||
"Delivering to Signal requires --to <E.164|group:ID|signal:group:ID|signal:+E.164>",
|
||||
"Delivering to Signal requires target <E.164|group:ID|signal:group:ID|signal:+E.164>",
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ export const slackOutbound: ChannelOutboundAdapter = {
|
||||
if (!trimmed) {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error("Delivering to Slack requires --to <channelId|user:ID|channel:ID>"),
|
||||
error: new Error("Delivering to Slack requires target <channelId|user:ID|channel:ID>"),
|
||||
};
|
||||
}
|
||||
return { ok: true, to: trimmed };
|
||||
|
||||
@@ -27,7 +27,7 @@ export const telegramOutbound: ChannelOutboundAdapter = {
|
||||
if (!trimmed) {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error("Delivering to Telegram requires --to <chatId>"),
|
||||
error: new Error("Delivering to Telegram requires target <chatId>"),
|
||||
};
|
||||
}
|
||||
return { ok: true, to: trimmed };
|
||||
|
||||
@@ -27,7 +27,7 @@ export const whatsappOutbound: ChannelOutboundAdapter = {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error(
|
||||
"Delivering to WhatsApp requires --to <E.164|group JID> or channels.whatsapp.allowFrom[0]",
|
||||
"Delivering to WhatsApp requires target <E.164|group JID> or channels.whatsapp.allowFrom[0]",
|
||||
),
|
||||
};
|
||||
}
|
||||
@@ -52,7 +52,7 @@ export const whatsappOutbound: ChannelOutboundAdapter = {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error(
|
||||
"Delivering to WhatsApp requires --to <E.164|group JID> or channels.whatsapp.allowFrom[0]",
|
||||
"Delivering to WhatsApp requires target <E.164|group JID> or channels.whatsapp.allowFrom[0]",
|
||||
),
|
||||
};
|
||||
},
|
||||
|
||||
@@ -202,7 +202,7 @@ export const signalPlugin: ChannelPlugin<ResolvedSignalAccount> = {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error(
|
||||
"Delivering to Signal requires --to <E.164|group:ID|signal:group:ID|signal:+E.164>",
|
||||
"Delivering to Signal requires target <E.164|group:ID|signal:group:ID|signal:+E.164>",
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -497,7 +497,7 @@ export const slackPlugin: ChannelPlugin<ResolvedSlackAccount> = {
|
||||
if (!trimmed) {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error("Delivering to Slack requires --to <channelId|user:ID|channel:ID>"),
|
||||
error: new Error("Delivering to Slack requires target <channelId|user:ID|channel:ID>"),
|
||||
};
|
||||
}
|
||||
return { ok: true, to: trimmed };
|
||||
|
||||
@@ -215,7 +215,7 @@ export const telegramPlugin: ChannelPlugin<ResolvedTelegramAccount> = {
|
||||
return "TELEGRAM_BOT_TOKEN can only be used for the default account.";
|
||||
}
|
||||
if (!input.useEnv && !input.token && !input.tokenFile) {
|
||||
return "Telegram requires --token or --token-file (or --use-env).";
|
||||
return "Telegram requires targetken or --token-file (or --use-env).";
|
||||
}
|
||||
return null;
|
||||
},
|
||||
@@ -285,7 +285,7 @@ export const telegramPlugin: ChannelPlugin<ResolvedTelegramAccount> = {
|
||||
if (!trimmed) {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error("Delivering to Telegram requires --to <chatId>"),
|
||||
error: new Error("Delivering to Telegram requires target <chatId>"),
|
||||
};
|
||||
}
|
||||
return { ok: true, to: trimmed };
|
||||
|
||||
@@ -316,7 +316,7 @@ export const whatsappPlugin: ChannelPlugin<ResolvedWhatsAppAccount> = {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error(
|
||||
"Delivering to WhatsApp requires --to <E.164|group JID> or channels.whatsapp.allowFrom[0]",
|
||||
"Delivering to WhatsApp requires target <E.164|group JID> or channels.whatsapp.allowFrom[0]",
|
||||
),
|
||||
};
|
||||
}
|
||||
@@ -341,7 +341,7 @@ export const whatsappPlugin: ChannelPlugin<ResolvedWhatsAppAccount> = {
|
||||
return {
|
||||
ok: false,
|
||||
error: new Error(
|
||||
"Delivering to WhatsApp requires --to <E.164|group JID> or channels.whatsapp.allowFrom[0]",
|
||||
"Delivering to WhatsApp requires target <E.164|group JID> or channels.whatsapp.allowFrom[0]",
|
||||
),
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user