fix(telegram): add dnsResultOrder=ipv4first default on Node 22+ to fix fetch failures (#5405)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 71366e9532
Co-authored-by: Glucksberg <80581902+Glucksberg@users.noreply.github.com>
Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com>
Reviewed-by: @obviyus
This commit is contained in:
Glucksberg
2026-02-22 10:37:51 -04:00
committed by GitHub
parent 4e65e61612
commit 53adae9cec
8 changed files with 153 additions and 13 deletions

View File

@@ -25,6 +25,12 @@ export type TelegramActionConfig = {
export type TelegramNetworkConfig = {
/** Override Node's autoSelectFamily behavior (true = enable, false = disable). */
autoSelectFamily?: boolean;
/**
* DNS result order for network requests ("ipv4first" | "verbatim").
* Set to "ipv4first" to prioritize IPv4 addresses and work around IPv6 issues.
* Default: "ipv4first" on Node 22+ to avoid common fetch failures.
*/
dnsResultOrder?: "ipv4first" | "verbatim";
};
export type TelegramInlineButtonsScope = "off" | "dm" | "group" | "all" | "allowlist";

View File

@@ -160,6 +160,7 @@ export const TelegramAccountSchemaBase = z
network: z
.object({
autoSelectFamily: z.boolean().optional(),
dnsResultOrder: z.enum(["ipv4first", "verbatim"]).optional(),
})
.strict()
.optional(),