mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-18 13:30:48 +00:00
* fix(pairing): show actual code in approval command instead of placeholder The pairing reply shown to new users included the approval command with a literal '<code>' placeholder. Users had to manually copy the code from one line and substitute it into the command. Now shows the ready-to-copy command with the real pairing code: Before: openclaw pairing approve telegram <code> After: openclaw pairing approve telegram abc123 Fixed in both the shared pairing message builder and the Telegram inline pairing reply. * test(pairing): update test to expect actual code instead of placeholder --------- Co-authored-by: Echo Ito <echoito@MacBook-Air.local>
21 lines
527 B
TypeScript
21 lines
527 B
TypeScript
import type { PairingChannel } from "./pairing-store.js";
|
|
import { formatCliCommand } from "../cli/command-format.js";
|
|
|
|
export function buildPairingReply(params: {
|
|
channel: PairingChannel;
|
|
idLine: string;
|
|
code: string;
|
|
}): string {
|
|
const { channel, idLine, code } = params;
|
|
return [
|
|
"OpenClaw: access not configured.",
|
|
"",
|
|
idLine,
|
|
"",
|
|
`Pairing code: ${code}`,
|
|
"",
|
|
"Ask the bot owner to approve with:",
|
|
formatCliCommand(`openclaw pairing approve ${channel} ${code}`),
|
|
].join("\n");
|
|
}
|