fix(telegram): include replied media files in reply context (#28488)

* fix(telegram): include replied media files in reply context

* fix(telegram): keep reply media fields nullable

* perf(telegram): defer reply-media fetch to debounce flush

* fix(telegram): gate and preserve reply media attachments

* fix(telegram): preserve cached-sticker reply media context

* fix: update changelog for telegram reply-media context fixes (#28488) (thanks @obviyus)
This commit is contained in:
Ayaan Zaidi
2026-02-27 15:16:21 +05:30
committed by GitHub
parent a7929abad8
commit aae90cb036
10 changed files with 376 additions and 30 deletions

View File

@@ -42,6 +42,7 @@ import { resolveThreadSessionKeys } from "../routing/session-key.js";
import type { RuntimeEnv } from "../runtime.js";
import { withTelegramApiErrorLogging } from "./api-logging.js";
import { isSenderAllowed, normalizeDmAllowFromWithStore } from "./bot-access.js";
import type { TelegramMediaRef } from "./bot-message-context.js";
import {
buildCappedTelegramMenuCommands,
buildPluginTelegramMenuCommands,
@@ -101,12 +102,13 @@ export type RegisterTelegramHandlerParams = {
shouldSkipUpdate: (ctx: TelegramUpdateKeyContext) => boolean;
processMessage: (
ctx: TelegramContext,
allMedia: Array<{ path: string; contentType?: string }>,
allMedia: TelegramMediaRef[],
storeAllowFrom: string[],
options?: {
messageIdOverride?: string;
forceWasMentioned?: boolean;
},
replyMedia?: TelegramMediaRef[],
) => Promise<void>;
logger: ReturnType<typeof getChildLogger>;
};