chore: align patch flow with repo-side contracts / 對齊 patch 流程與 repo-side contracts
This commit is contained in:
@@ -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", ""),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user