mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 02:32:44 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user