chore: align patch flow with repo-side contracts / 對齊 patch 流程與 repo-side contracts

This commit is contained in:
Alice (OpenClaw)
2026-05-14 09:54:10 +08:00
parent e14f63b510
commit 9cb368bbd2
3 changed files with 15 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
import type { ReplyEndChoice, TelegramInlineButton } from "../types.js"
import { buildTelegramReplyEndAck, buildTelegramReplyEndButtonsForReply, buildTelegramReplyEndButtonsForResolvedChoice } from "./openclaw-telegram-bridge.js"
import { applyTelegramReplyEndStopPolicy, buildTelegramReplyEndAck, buildTelegramReplyEndButtonsForReply, buildTelegramReplyEndButtonsForResolvedChoice } from "./openclaw-telegram-bridge.js"
export type OpenClawTelegramPatchContract = {
defaultButtons: TelegramInlineButton[][]
@@ -7,6 +7,7 @@ export type OpenClawTelegramPatchContract = {
buttons: TelegramInlineButton[][]
acknowledgement: string
}>
stopPolicyText: string
}
export function buildOpenClawTelegramPatchContract(): OpenClawTelegramPatchContract {
@@ -22,5 +23,12 @@ export function buildOpenClawTelegramPatchContract(): OpenClawTelegramPatchContr
acknowledgement: buildTelegramReplyEndAck("stop"),
},
},
stopPolicyText: applyTelegramReplyEndStopPolicy("__BASE__", {
lastChoice: "stop",
lastChoiceAt: "1970-01-01T00:00:00Z",
sourceMessageId: "0",
sourceCallbackId: "0",
active: true,
}).replace("__BASE__\n\n", ""),
}
}