

























@@ -11,6 +11,7 @@ export function describeTelegramInteractiveButtonBehavior(): void {
1111type: "buttons",
1212buttons: [
1313{ label: "Approve", value: "approve", style: "success" },
14+{ label: "Docs", url: "https://example.com/docs", style: "primary" },
1415{ label: "Reject", value: "reject", style: "danger" },
1516{ label: "Later", value: "later" },
1617{ label: "Archive", value: "archive" },
@@ -25,10 +26,13 @@ export function describeTelegramInteractiveButtonBehavior(): void {
2526).toEqual([
2627[
2728{ text: "Approve", callback_data: "approve", style: "success" },
29+{ text: "Docs", url: "https://example.com/docs", style: "primary" },
2830{ text: "Reject", callback_data: "reject", style: "danger" },
31+],
32+[
2933{ text: "Later", callback_data: "later", style: undefined },
34+{ text: "Archive", callback_data: "archive", style: undefined },
3035],
31-[{ text: "Archive", callback_data: "archive", style: undefined }],
3236[{ text: "Alpha", callback_data: "alpha", style: undefined }],
3337]);
3438});
@@ -60,12 +64,20 @@ export function describeTelegramInteractiveButtonBehavior(): void {
6064blocks: [
6165{
6266type: "buttons",
63-buttons: [{ label: "Retry", value: "retry", style: "primary" }],
67+buttons: [
68+{ label: "Retry", value: "retry", style: "primary" },
69+{ label: "Docs", value: "docs", url: "https://example.com/docs" },
70+],
6471},
6572],
6673},
6774}),
68-).toEqual([[{ text: "Retry", callback_data: "retry", style: "primary" }]]);
75+).toEqual([
76+[
77+{ text: "Retry", callback_data: "retry", style: "primary" },
78+{ text: "Docs", url: "https://example.com/docs", style: undefined },
79+],
80+]);
6981});
7082});
7183}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。