fix(discord): land proxy/media/reaction/model-picker regressions

Reimplements core Discord fixes from #25277 #25523 #25575 #25588 #25731 with expanded tests.

- thread proxy-aware fetch into inbound attachment/sticker downloads
- fetch /gateway/bot via proxy dispatcher before ws connect
- wire statusReactions emojis/timing overrides into controller
- compact model-picker custom_id keys with backward-compatible parsing

Co-authored-by: openperf <openperf@users.noreply.github.com>
Co-authored-by: chilu18 <chilu18@users.noreply.github.com>
Co-authored-by: Yipsh <Yipsh@users.noreply.github.com>
Co-authored-by: lbo728 <lbo728@users.noreply.github.com>
Co-authored-by: s1korrrr <s1korrrr@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-02-25 00:03:21 +00:00
parent 55cf92578d
commit 97e56cb73c
12 changed files with 265 additions and 23 deletions

View File

@@ -577,11 +577,11 @@ export function buildDiscordModelPickerCustomId(params: {
: undefined;
const parts = [
`${DISCORD_MODEL_PICKER_CUSTOM_ID_KEY}:cmd=${encodeCustomIdValue(params.command)}`,
`act=${encodeCustomIdValue(params.action)}`,
`view=${encodeCustomIdValue(params.view)}`,
`${DISCORD_MODEL_PICKER_CUSTOM_ID_KEY}:c=${encodeCustomIdValue(params.command)}`,
`a=${encodeCustomIdValue(params.action)}`,
`v=${encodeCustomIdValue(params.view)}`,
`u=${encodeCustomIdValue(userId)}`,
`pg=${String(page)}`,
`g=${String(page)}`,
];
if (normalizedProvider) {
parts.push(`p=${encodeCustomIdValue(normalizedProvider)}`);
@@ -635,12 +635,12 @@ export function parseDiscordModelPickerData(data: ComponentData): DiscordModelPi
return null;
}
const command = decodeCustomIdValue(coerceString(data.cmd));
const action = decodeCustomIdValue(coerceString(data.act));
const view = decodeCustomIdValue(coerceString(data.view));
const command = decodeCustomIdValue(coerceString(data.c ?? data.cmd));
const action = decodeCustomIdValue(coerceString(data.a ?? data.act));
const view = decodeCustomIdValue(coerceString(data.v ?? data.view));
const userId = decodeCustomIdValue(coerceString(data.u));
const providerRaw = decodeCustomIdValue(coerceString(data.p));
const page = parseRawPage(data.pg);
const page = parseRawPage(data.g ?? data.pg);
const providerPage = parseRawPositiveInt(data.pp);
const modelIndex = parseRawPositiveInt(data.mi);
const recentSlot = parseRawPositiveInt(data.rs);