17 lines
538 B
TypeScript
17 lines
538 B
TypeScript
import { buildReplyEndState } from "../core/state.js"
|
|
import { normalizeTelegramCallback } from "../core/callback-contract.js"
|
|
import type { ReplyEndState } from "../types.js"
|
|
|
|
export function handleTelegramReplyEndCallback(params: {
|
|
callbackData: string
|
|
conversationId: string
|
|
sessionKey: string | null
|
|
sourceMessageId: string
|
|
sourceCallbackId: string
|
|
timestamp: string
|
|
}): ReplyEndState | null {
|
|
const normalized = normalizeTelegramCallback(params)
|
|
if (!normalized) return null
|
|
return buildReplyEndState(normalized)
|
|
}
|