Files
openclaw/src/pairing/pairing-messages.ts
SUMUKH 149c4683a3 fix: scope Telegram pairing code blocks (#52784) (thanks @sumukhj1219)
* Telegram: format pairing challenge for easier copy

* test: restore Telegram pairing chatId assertion

* fix: scope Telegram pairing code blocks (#52784) (thanks @sumukhj1219)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 11:03:33 +05:30

27 lines
675 B
TypeScript

import { formatCliCommand } from "../cli/command-format.js";
import type { PairingChannel } from "./pairing-store.js";
export function buildPairingReply(params: {
channel: PairingChannel;
idLine: string;
code: string;
}): string {
const { channel, idLine, code } = params;
const approveCommand = formatCliCommand(`openclaw pairing approve ${channel} ${code}`);
return [
"OpenClaw: access not configured.",
"",
idLine,
"Pairing code:",
"```",
code,
"```",
"",
"Ask the bot owner to approve with:",
formatCliCommand(`openclaw pairing approve ${channel} ${code}`),
"```",
approveCommand,
"```",
].join("\n");
}