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

@@ -101,10 +101,15 @@ export async function processDiscordMessage(ctx: DiscordMessagePreflightContext)
threadBindings,
route,
commandAuthorized,
discordRestFetch,
} = ctx;
const mediaList = await resolveMediaList(message, mediaMaxBytes);
const forwardedMediaList = await resolveForwardedMediaList(message, mediaMaxBytes);
const mediaList = await resolveMediaList(message, mediaMaxBytes, discordRestFetch);
const forwardedMediaList = await resolveForwardedMediaList(
message,
mediaMaxBytes,
discordRestFetch,
);
mediaList.push(...forwardedMediaList);
const text = messageText;
if (!text) {
@@ -147,6 +152,8 @@ export async function processDiscordMessage(ctx: DiscordMessagePreflightContext)
enabled: statusReactionsEnabled,
adapter: discordAdapter,
initialEmoji: ackReaction,
emojis: cfg.messages?.statusReactions?.emojis,
timing: cfg.messages?.statusReactions?.timing,
onError: (err) => {
logAckFailure({
log: logVerbose,