fix: restore telegram draft streaming partials

This commit is contained in:
Ayaan Zaidi
2026-01-31 21:55:59 +05:30
committed by Ayaan Zaidi
parent 35988d77ec
commit 37721ebd7c
12 changed files with 260 additions and 54 deletions

View File

@@ -1,5 +1,4 @@
import { formatLocationText, type NormalizedLocation } from "../../channels/location.js";
import type { TelegramAccountConfig } from "../../config/types.telegram.js";
import type {
TelegramForwardChat,
TelegramForwardOrigin,
@@ -61,9 +60,9 @@ export function buildTypingThreadParams(messageThreadId?: number) {
return { message_thread_id: Math.trunc(messageThreadId) };
}
export function resolveTelegramStreamMode(
telegramCfg: Pick<TelegramAccountConfig, "streamMode"> | undefined,
): TelegramStreamMode {
export function resolveTelegramStreamMode(telegramCfg?: {
streamMode?: TelegramStreamMode;
}): TelegramStreamMode {
const raw = telegramCfg?.streamMode?.trim().toLowerCase();
if (raw === "off" || raw === "partial" || raw === "block") {
return raw;