惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
Engineering at Meta
Engineering at Meta
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
H
Hackread – Cybersecurity News, Data Breaches, AI and More
WordPress大学
WordPress大学
博客园_首页
美团技术团队
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
J
Java Code Geeks
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog
雷峰网
雷峰网
爱范儿
爱范儿

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: preserve discord setup channel allowlists (#47788) (...
steipete · 2026-05-02 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -60,6 +60,7 @@ Docs: https://docs.openclaw.ai

6060

- Proxy/audio: convert standard `FormData` bodies before proxy-backed undici fetches, so audio transcription and multipart uploads no longer send `[object FormData]` when `HTTP_PROXY` or `HTTPS_PROXY` is configured. Fixes #48554. Thanks @dco5.

6161

- Discord: allow explicitly configured ack reactions in tool-only guild channels while keeping automatic lifecycle/status reactions suppressed. Fixes #74922. Thanks @samvilian and @BlueBirdBack.

6262

- Discord: enable session-backed A2A announce target lookup so `sessions_send` uses the target session's `deliveryContext.accountId` or `lastAccountId` instead of falling back to the default bot in multi-account setups. Fixes #42652; refs #51626 and #44773; supersedes #73975. Thanks @irchelper, @dpalfox, and @Lanfei.

63+

- Discord/setup: write resolved guild/channel allowlist selections to the selected guild and channel instead of falling back to the wildcard guild during setup. Supersedes #47788. Thanks @Eldersonar.

6364

- Discord: treat abort-time Carbon reconnect-exhausted events as expected shutdown during stale-socket restarts, so health-monitor restarts no longer reject the monitor lifecycle. Carries forward #58216; supersedes #73949. Thanks @Perttulands.

6465

- Discord/native commands: return an explicit warning when slash command dispatch or direct plugin execution produces no visible reply instead of a success-style completion ack. Fixes #58986; supersedes #62057. Thanks @jb510.

6566

- Discord: keep typing indicators alive during long tool runs and auto-compaction while keepalive ticks continue, so active sessions do not appear stalled before the final reply. Thanks @Squirbie.

Original file line numberDiff line numberDiff line change

@@ -27,13 +27,44 @@ const DISCORD_TOKEN_HELP_LINES = [

2727

`Docs: ${formatDocsLink("/discord", "discord")}`,

2828

];

2929
30+

type DiscordGuildChannelAllowlistEntry = {

31+

guildKey: string;

32+

channelKey?: string;

33+

};

34+
35+

type DiscordSetupAllowlistResolution = {

36+

resolved?: boolean;

37+

guildId?: string;

38+

channelId?: string;

39+

guildKey?: string;

40+

channelKey?: string;

41+

};

42+
43+

function mapDiscordSetupAllowlistEntries(resolved: unknown): DiscordGuildChannelAllowlistEntry[] {

44+

if (!Array.isArray(resolved)) {

45+

return [];

46+

}

47+

return resolved.flatMap((entry): DiscordGuildChannelAllowlistEntry[] => {

48+

if (!entry || typeof entry !== "object") {

49+

return [];

50+

}

51+

const row = entry as DiscordSetupAllowlistResolution;

52+

if (row.resolved === false) {

53+

return [];

54+

}

55+

const guildKey = normalizeOptionalString(row.guildId ?? row.guildKey);

56+

if (!guildKey) {

57+

return [];

58+

}

59+

const channelKey = normalizeOptionalString(row.channelId ?? row.channelKey);

60+

return channelKey ? [{ guildKey, channelKey }] : [{ guildKey }];

61+

});

62+

}

63+
3064

function setDiscordGuildChannelAllowlist(

3165

cfg: OpenClawConfig,

3266

accountId: string,

33-

entries: Array<{

34-

guildKey: string;

35-

channelKey?: string;

36-

}>,

67+

entries: DiscordGuildChannelAllowlistEntry[],

3768

): OpenClawConfig {

3869

const baseGuilds =

3970

accountId === DEFAULT_ACCOUNT_ID

@@ -152,7 +183,8 @@ export function createDiscordSetupWizardBase(handlers: {

152183

cfg: OpenClawConfig;

153184

accountId: string;

154185

resolved: unknown;

155-

}) => setDiscordGuildChannelAllowlist(cfg, accountId, resolved as never),

186+

}) =>

187+

setDiscordGuildChannelAllowlist(cfg, accountId, mapDiscordSetupAllowlistEntries(resolved)),

156188

}),

157189

allowFrom: createAccountScopedAllowFromSection({

158190

channel,

Original file line numberDiff line numberDiff line change

@@ -94,3 +94,44 @@ describe("discordSetupWizard.status", () => {

9494

expect(configured).toBe(false);

9595

});

9696

});

97+
98+

describe("discordSetupWizard.groupAccess", () => {

99+

it("writes resolved Discord channel rows to their selected guild and channel", () => {

100+

const next = discordSetupWizard.groupAccess?.applyAllowlist?.({

101+

cfg: {

102+

channels: {

103+

discord: {

104+

guilds: {

105+

existing: {

106+

channels: {

107+

keep: { enabled: true },

108+

},

109+

},

110+

},

111+

},

112+

},

113+

} as OpenClawConfig,

114+

accountId: "default",

115+

resolved: [

116+

{

117+

input: "OpenClaw/#triage",

118+

resolved: true,

119+

guildId: "guild-1",

120+

channelId: "channel-1",

121+

},

122+

{

123+

input: "missing",

124+

resolved: false,

125+

},

126+

],

127+

});

128+
129+

expect(next?.channels?.discord?.guilds?.["guild-1"]?.channels?.["channel-1"]).toEqual({

130+

enabled: true,

131+

});

132+

expect(next?.channels?.discord?.guilds?.["*"]).toBeUndefined();

133+

expect(next?.channels?.discord?.guilds?.existing?.channels?.keep).toEqual({

134+

enabled: true,

135+

});

136+

});

137+

});